Repository navigation
Remove the one-time import blocks - #1
Merged
Merged
Conversation
The organization is adopted into state, so the imports are no longer needed.
OpenTofu plan for
|
oskarbarcz
added a commit
that referenced
this pull request
Nov 10, 2026
The default-branch rulesets were made by hand, one repository at a time, and had drifted apart. Four of them still require the old matrix check names (`code (seatmap)`, `code (layouts)`, `code (pull)`, `code (city)`), which the flattened function repositories no longer report, so mypreflight/aerolopa-provider#14, mypreflight/osm-provider#12 and mypreflight/postcard-generator#14 can't merge. oceanic-tracks-provider had no ruleset at all. Every repository now gets the same `Main branch protection` ruleset from `infra/rulesets.tf`. The branch can't be deleted or force-pushed. Changes arrive through pull requests with every conversation resolved and only the merge methods the repository allows. The checks in `required_checks` must pass, reported by GitHub Actions on a branch that is up to date. `required_checks` defaults to `[files, code]` in `config/repositories.yaml`. github-iac sets `[plan]`, product `[markdownlint]` and transponder-app `[files, code, executable]`. `.github` sets `branch_protection: false` and stays unprotected, as it is today. `infra/imports.tf` adopts the nine existing rulesets, and a `moved` block turns github-iac's "Require a passing plan" into its entry in the new resource. Only oceanic-tracks-provider's is created. The README describes the keys. ## What the apply changes - **Every ruleset**: - **Name**: `Main branch protection` (product's was `main`, github-iac's `Require a passing plan`). - **Check source**: every required check is pinned to GitHub Actions; adsb-receiver-api, app and landing had unpinned ones. - **Up-to-date branch**: required everywhere; landing didn't require it. - **New branches**: the checks also apply to newly created branches; aerolopa-provider and app exempted them. - **aerolopa-provider, osm-provider, postcard-generator**: `files` and `code` replace the matrix checks. - **Pull request rule**: added to aerolopa-provider, postcard-generator, adsb-receiver-api, app and github-iac. osm-provider now requires conversations to be resolved. - **api**: gains the deletion rule. **github-iac**: gains deletion and force-push protection. - **Dropped**: - `required_signatures`, which only aerolopa-provider had. - The code quality rule on aerolopa-provider, osm-provider, adsb-receiver-api and landing. The provider (6.13) has no such rule type, and none of the four has a code-quality analysis for it to check. ## After merging The apply makes the three function pull requests above mergeable. Then remove `infra/imports.tf` in a follow-up, as in #1; its plan should show no changes. ## Verification - `tofu fmt -check` and `tofu validate` pass. - On a copy without the backend, `local.protected_repositories` lists the 11 repositories with the checks and merge methods above. - The plan on this pull request is the real check. It should show 9 imports, 1 move, 1 create and in-place updates only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
The first apply adopted the mypreflight organization into state (14 imported, 5 added, 1 changed, 0 destroyed), so the import blocks are no longer needed. The plan on this PR should show no changes.