Skip to content

fix: exclude private repositories from branch protections - #48

Merged
xnoto merged 1 commit into
mainfrom
exclude-private-branch-protections
Aug 30, 2026
Merged

fix: exclude private repositories from branch protections#48
xnoto merged 1 commit into
mainfrom
exclude-private-branch-protections

Conversation

@xnoto

@xnoto xnoto commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Excludes every repository in local.private_github_repositories from both standard and relaxed github_branch_protection resources.

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-knowledge remains private and receives no Terraform-managed branch protection.

Why now

The just-merged auto-merge setting change partially applied: kustomize-cluster.allow_auto_merge completed, then the apply failed trying to create relaxed protection for private agent-knowledge with:

Upgrade to GitHub Pro or make this repository public to enable this feature.

This PR removes the unsupported resource from the desired state, allowing the next environment-gated apply to converge successfully.

Expected plan

  • No agent-knowledge branch-protection creation.
  • kustomize-cluster.allow_auto_merge should already be converged from the partial apply; CI plan is authoritative for confirming that.
  • No secrets, repository visibility, branch protections on public repositories, or GitHub App permissions change.

Follow-up

Once this root apply succeeds, charts PR #20 can merge. The next real opencode-server release will then prove that GitHub auto-merges the generated version-pin PR after kustomize-cluster test passes.

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.
@xnoto
xnoto requested a review from a team as a code owner August 30, 2026 19:00
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

OpenTofu Test

OpenTofu test passed.

View the workflow run.

View run output
Terraform validate.......................................................Passed
Terraform validate with tflint...........................................Passed
Checkov..................................................................Passed
Terraform fmt............................................................Passed
Terraform docs...........................................................Passed
Detect hardcoded secrets.................................................Passed
check for case conflicts.................................................Passed
check for merge conflicts................................................Passed
check for broken symlinks............................(no files to check)Skipped
check vcs permalinks.....................................................Passed
detect destroyed symlinks................................................Passed
detect private key.......................................................Passed
fix end of files.........................................................Passed
mixed line ending........................................................Passed
trim trailing whitespace.................................................Passed
don't commit to branch..................................................Skipped
check for added large files..............................................Passed

@github-actions

Copy link
Copy Markdown
Contributor

OpenTofu Plan

OpenTofu plan passed.

View the workflow run.

View run output
No 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
xnoto merged commit f88283c into main Aug 30, 2026
4 checks passed
@xnoto
xnoto deleted the exclude-private-branch-protections branch August 30, 2026 19:37
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant