ci(renovate): auto-merge minor/patch after a release-age hold #34
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!34
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/renovate-automerge"
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?
Cuts the churn of rubber-stamping dependency PRs. Scope is deliberately narrow: minor, patch, pin, digest only — majors stay manual.
Why this is safe here specifically
The cautionary tale from the chameth.com migration write-up was auto-merges landing before CI reported, so Renovate marked PRs merged and the commits never reached the default branch. Root cause: no branch protection existed.
We have it, and I verified the specifics rather than assuming:
So the
renovatecollaborator can merge, but only through the required checks — which cover typecheck, lint, unit tests, e2e, visual regression, container smoke test and secret scan. Renovate cannot vote itself in.Three safeguards beyond CI
minimumReleaseAge: "3 days"— the one failure mode CI genuinely cannot catch is a release yanked or hotfixed hours after publication. A version must be public for three days before Renovate will open, and therefore merge, it.rebaseWhen: "behind-base-branch"— there's no merge queue (#25), so a PR is normally tested against the base it was pushed on, not the base it lands on. Rebasing whenmainmoves closes that gap for Renovate's PRs: CI re-runs against currentmainbefore auto-merge fires.This is the targeted alternative to flipping
block_on_outdated_branchon the protection rule (currentlyfalse), which would give the same guarantee but force every human PR to rebase whenevermainmoves. Worth considering separately — with ~10 min CI that's a real tax on stacked work, so I left it alone.platformAutomerge: true— prefer the forge's "merge when checks succeed" over Renovate merging by hand. If Forgejo's platform doesn't implement it, Renovate falls back to merging itself once green; branch protection gates it either way.Two exclusions, even for patches
Placed after the auto-merge rule, since later rules win in Renovate:
expo— CI never compiles native code, so a green PR proves only the JS side. Any SDK movement needs an EAS build before landing. Auto-merging would ship unverified native changes, precisely what the existingexpo install --fixrule exists to prevent.@fission-ai/openspec— itspostUpgradeTaskregenerates committed agent skills and slash commands; a generated-file diff deserves eyes.The already-disabled Expo family (
expo-*,@expo/*,react-native*) is unaffected — it produces no PRs at all.Validation
Parsed the config with
json5and computed the effectiveautomergevalue per package, applying Renovate's later-wins ordering, rather than eyeballing the rules:reactreactvite@sentry/nodenodeexpo@fission-ai/openspecexpo-routerWhat to watch on the first run
Renovate runs weekly (Monday before 6am) or on dispatch. Two things worth checking the first time it auto-merges:
require_signed_commitsis on, and Forgejo creates the merge commit, so it should be, but this is the first time a non-human will exercise that path;platformAutomergeis actually honoured on Forgejo rather than silently falling back — visible in the run log.The workflow's
dry_runinput defaults totrue, so a dispatch is a safe way to preview the effect before Monday.