Skip to content

Remove the one-time import blocks - #1

Merged
oskarbarcz merged 1 commit into
mainfrom
remove-imports
Nov 9, 2026
Merged

oskarbarcz merged 1 commit into
mainfrom
remove-imports

Conversation

@oskarbarcz

Copy link
Copy Markdown
Member

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.

The organization is adopted into state, so the imports are no longer needed.
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

OpenTofu plan for infra

Commit 8c8d9a4 · No changes. Your infrastructure matches the configuration.

Show plan
 No changes. Your infrastructure matches the configuration.
 
 OpenTofu has compared your real infrastructure against your configuration and
 found no differences, so no changes are needed.

Workflow run

@oskarbarcz
oskarbarcz merged commit 4109ee3 into main Nov 9, 2026
1 check passed
@oskarbarcz
oskarbarcz deleted the remove-imports branch November 9, 2026 10:23
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>
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