Skip to content

Commit 0531db8

Browse files
committed
Switch ref_name to Optional as push doesn't need a ref_name
Signed-off-by: Timo Sand <[email protected]>
1 parent 10c76c7 commit 0531db8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

github/resource_github_organization_ruleset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
9393
Schema: map[string]*schema.Schema{
9494
"ref_name": {
9595
Type: schema.TypeList,
96-
Required: true,
96+
Optional: true,
9797
MaxItems: 1,
9898
Elem: &schema.Resource{
9999
Schema: map[string]*schema.Schema{

github/resource_github_organization_ruleset_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,7 @@ func TestGithubOrganizationRulesets(t *testing.T) {
617617
Steps: []resource.TestStep{
618618
{
619619
Config: config,
620-
ExpectError: regexp.MustCompile("Insufficient ref_name blocks"),
621-
// ExpectError: regexp.MustCompile("ref_name and repository_name or ref_name and repository_id must be set for branch and tag targets"),
620+
ExpectError: regexp.MustCompile("ref_name and repository_name or ref_name and repository_id must be set for branch and tag targets"),
622621
},
623622
},
624623
})

0 commit comments

Comments
 (0)