fix: exclude private repositories from branch protections - #48
Merged
Conversation
Do not create standard or relaxed branch-protection resources for repositories in local.private_github_repositories. GitHub Free cannot apply the configured restriction to private repositories, and personal private repositories are outside the organization review policy. This unblocks the tfroot-github apply that otherwise fails trying to create agent-knowledge branch protection.
Contributor
OpenTofu TestOpenTofu test passed. View run output |
Contributor
OpenTofu PlanOpenTofu plan passed. View run outputNo changes. Your infrastructure matches the configuration.
OpenTofu has compared your real infrastructure against your configuration and
--
No changes. Your infrastructure matches the configuration.
OpenTofu has compared your real infrastructure against your configuration and |
xnoto
added a commit
that referenced
this pull request
Aug 30, 2026
## Summary - add `tfroot-namecheap` to the existing chart-updater GitHub App private-key Actions-secret recipient list - make no encrypted SOPS value changes and expose no secret material ## Consumer impact `tfroot-namecheap` is the only current OpenTofu reusable-workflow caller missing this recipient and now has a companion caller mapping in [tfroot-namecheap#2](makeitworkcloud/tfroot-namecheap#2). Existing root callers already forward the same secret. ## Delivery dependency The secret is not present in `tfroot-namecheap` until this PR is validated, merged, and its environment-gated `main` apply succeeds. Merge only after the existing branch-protection recovery PR #48 has completed its intended reconciliation. ## Validation PR CI plans are the validation authority. No local OpenTofu, decryption, or apply operation was run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Excludes every repository in
local.private_github_repositoriesfrom both standard and relaxedgithub_branch_protectionresources.This makes the policy explicit and future-proof: private personal repositories are outside the organization review policy, and GitHub Free cannot apply the configured branch restrictions to them.
agent-knowledgeremains private and receives no Terraform-managed branch protection.Why now
The just-merged auto-merge setting change partially applied:
kustomize-cluster.allow_auto_mergecompleted, then the apply failed trying to create relaxed protection for privateagent-knowledgewith:This PR removes the unsupported resource from the desired state, allowing the next environment-gated apply to converge successfully.
Expected plan
agent-knowledgebranch-protection creation.kustomize-cluster.allow_auto_mergeshould already be converged from the partial apply; CI plan is authoritative for confirming that.Follow-up
Once this root apply succeeds, charts PR #20 can merge. The next real
opencode-serverrelease will then prove that GitHub auto-merges the generated version-pin PR afterkustomize-clustertestpasses.