ci: auto-merge Dependabot PRs that pass all required checks#614
Merged
Conversation
Adds a workflow that enables GitHub's native auto-merge (squash) on Dependabot's own PRs. The actual merge is gated by the branch's required status checks (lint, build, e2e, audit) — auto-merge waits for them, so a bump only lands when the full CI suite is green. No approval step is needed (main requires 0 reviews). Applies to all update types, including majors, as long as CI passes; a commented note shows how to exclude majors later. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a dependabot/fetch-metadata step and gates auto-merge on update-type != semver-major. Patch and minor bumps auto-merge once the required checks pass; major bumps stay open for manual review. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Enables GitHub's native auto-merge (squash) on Dependabot's own PRs for patch and minor bumps. A new workflow (
dependabot-automerge.yml) turns on auto-merge; GitHub then merges only once the branch's required status checks pass — so a bump lands only when the full suite is green. Major bumps are left open for manual review (gated viadependabot/fetch-metadataonupdate-type != semver-major).Companion change (already applied to
mainbranch protection): required status checks expanded from justbuildtolint+build+e2e+audit. Without this, auto-merge would fire onbuildalone. CodeQL is intentionally left non-required (it legitimately "skips" on some docker/actions-only PRs, which would otherwise stall merges).allow_update_branchis on, so auto-merge auto-updates a behind PR branch under thestrict(up-to-date) rule.No approval step —
mainrequires 0 reviews.Consequences:
main→deploy.yml→flyctl deploy, so passing non-major bumps ship to production automatically.Note: this PR is not itself a Dependabot PR, so it won't auto-merge — merged manually once green.
🤖 Generated with Claude Code