Repository navigation
ci(dependabot): switch on auto-merge for minor and patch group updates - #271
Merged
Merged
Conversation
The repo allows auto-merge, but nothing turned it on for each Dependabot PR, so #270 sat open and green for hours. This workflow enables auto-merge (squash) for the "actions" and "python" groups only; major groups and ungrouped updates still wait for a person. It never checks out or runs the PR's code. Assisted-by: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175Q8iDyvh1Ws5birviskkd
Contributor
|
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.
What was wrong, what you changed, how you checked:
Dependabot's minor/patch PRs were meant to auto-merge (see #269), and the repo setting "Allow auto-merge" is on, but that setting only permits auto-merge: something still has to switch it on for each PR. Nothing did, so #270 sat open with every check green until it was merged by hand.
This adds
.github/workflows/dependabot-auto-merge.yml. On Dependabot PRs it runsgh pr merge --auto --squash, but only for the minor/patch group branches (dependabot/github_actions/actions-<hash>,dependabot/pip/python-<hash>). The-majorgroups and any ungrouped update (e.g. a security fix) are left for review. The "protect main" ruleset's required checks still have to pass before anything merges. It uses no actions and never checks out the PR's code.One side effect: a merge made with the workflow token doesn't trigger push workflows on main (e.g. release-drafter) for that commit. The next normal merge catches up.
Fixes n/a (follow-up to #269 / #270)
tests/test_dependabot_auto_merge.pyfails without the workflow (file missing) and passes with it (4 tests: minor/patch groups match, major groups and single updates don't, group names match dependabot.yml).python -m pytestpasses locally (467 passed, 1 skipped).Assisted-by: Claude Code
Generated by Claude Code