Enable branch protection on main: require green CI before merge #56
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#56
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the 2026-07-15 review follow-ups. The Forgejo Actions migration PR merged with a red pipeline and nothing prevented it — CI is currently advisory. Once #41 makes the pipeline green, add a branch protection rule on
main:main(PRs only) — including for the bot accountautomerge— pairs nicely with protection)Depends on: #41 (protection with a permanently-red pipeline would block all merges).
Done — all three items
Require status checks before merge
The contexts were not guessed. A wrong context string would have blocked every merge permanently, so I read what the sibling repos on this instance already use —
Quest-Boardhas exactly["CI / *"]. This workflow is also namedCI, so the glob covers all five jobs.It deliberately does not match the new
Dependency auditworkflow (#81), so advisories report without gating merges — the coupling that made this issue un-actionable until today.required_approvals: 0is intentional: on a single-maintainer repo, requiring one would deadlock on self-approval.Block direct pushes to
mainenable_push: false. Verified by behaviour, not by reading the config back — pushed a probe commit atmainand got:The probe was then rolled back locally; nothing reached the remote.
Renovate automerge
Decided yes for minor/patch, extended from
github-actionsto the batchednpm (non-major)group — landed in #82 (bd83fee), which was itself the first change to go through the new protection, validating the whole path end to end.A security review then flagged automerge without a release-age quarantine, which was correct and exposed a flaw in my justification. I had argued automerge was safe because Renovate waits for green CI — but green CI is the wrong threat model. A hijacked package's
postinstalldoes not failruff,mypy,vitestor Playwright;npm ciruns on the shared runner,release.ymlholds registry push credentials, and the image reaches the dev server.So
minimumReleaseAge: "3 days"now guards both automerge rules — npm and github-actions. Actions execute directly in the runner, so guarding only npm would have half-closed it. Majors are unaffected: stilldependencyDashboardApprovaland hand-merged.Worth recording for whoever reads this next: this issue depended on #41, but what actually unblocked it was #81 splitting the dependency audit out.
continue-on-error: truedoes not suppress run failure on this runner, so the "advisory" audit was a hard gate in practice — enabling protection before that would have blocked every merge, and re-blocked on every newly published transitive CVE.overridespins once eslint ships the fixes upstream #101