Skip to content

Commit 4ea85bf

Browse files
committed
Update repository property references to use default_branch in organization ruleset tests
1 parent 91298ad commit 4ea85bf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

github/resource_github_organization_ruleset_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ resource "github_repository" "test" {
4040
visibility = "private"
4141
auto_init = true
4242
}
43-
4443
resource "github_repository_file" "workflow_file" {
4544
repository = github_repository.test.name
46-
branch = "main"
45+
branch = github_repository.test.default_branch
4746
file = "%[3]s"
4847
content = replace(local.workflow_content, "\t", " ") # NOTE: 'content' must be indented with spaces, not tabs
4948
commit_message = "Managed by Terraform"
@@ -128,7 +127,7 @@ resource "github_organization_ruleset" "test" {
128127
required_workflow {
129128
path = github_repository_file.workflow_file.file
130129
repository_id = github_repository.test.repo_id
131-
ref = "main" # Default ref is master
130+
ref = github_repository.test.default_branch
132131
}
133132
}
134133

0 commit comments

Comments
 (0)