Skip to content

Commit

Permalink
Merge pull request #1 from HappyPathway/codeowners_conditional
Browse files Browse the repository at this point in the history
Codeowners conditional
  • Loading branch information
David Arnold authored and GitHub committed May 7, 2024
2 parents 719aa2c + 71fef26 commit 82cb3e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion github_files.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file
resource "github_repository_file" "codeowners" {
count = var.create_codeowners ? 1 : 0
repository = github_repository.repo.name
branch = var.github_default_branch
file = "CODEOWNERS"
Expand All @@ -26,4 +27,4 @@ resource "github_repository_file" "extra_files" {
branch
]
}
}
}
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,7 @@ variable "pull_request_bypassers" {
type = list(any)
}

variable create_codeowners {
default = true
type = bool
}

0 comments on commit 82cb3e1

Please sign in to comment.