Skip to content

Commit

Permalink
Enhance branch protection dependencies to include codeowners and extr…
Browse files Browse the repository at this point in the history
…a files for improved resource management
  • Loading branch information
Dave Arnold committed Feb 19, 2025
1 parent a38be9e commit 1193afe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion branch_protection.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,10 @@ resource "github_branch_protection" "protection" {
}
}

depends_on = [local.repo_exists]
depends_on = [
local.repo_exists,
github_repository_file.codeowners,
github_repository_file.extra_files,
github_repository_file.managed_extra_files
]
}
3 changes: 1 addition & 2 deletions data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ locals {

data "github_repository" "existing" {
count = var.create_repo ? 0 : 1
name = var.name
full_name = var.repo_org != null ? "${var.repo_org}/${var.name}" : var.name
full_name = "${var.repo_org}/${var.name}"
}

0 comments on commit 1193afe

Please sign in to comment.