Repository navigation
feat: auto-merge Dependabot's patch and minor updates, when asked - #75
Merged
Merged
Conversation
modules.automerge, off unless asked for and in no preset, writes .github/workflows/automerge.yml. It calls the new reusable workflow dependabot-automerge.yml, which reads the update with dependabot/fetch-metadata and turns on auto-merge for a patch or minor update; a major, or a group holding one, stays manual. GitHub merges only once the required checks and reviews pass, and the workflow leaves auto-merge off where the default branch requires neither. It never approves, so under strict the required review still gates the merge. github.merge.auto_merge maps to allow_auto_merge; github apply turns it on while the module is on, and the module with auto_merge: false is refused. An optional Dependabot secret AUTOMERGE_TOKEN lets the merge start workflows on the default branch. On GitLab the switch writes nothing and says what does the work there.
It runs init once for each fixture: about 5 s locally, and it timed out at the 20 s default on the windows-latest runner for #74 before passing on a rerun.
vannt-dev
force-pushed
the
feat/dependabot-automerge
branch
from
October 20, 2026 15:39
fcdbb9f to
288a5da
Compare
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 changes for users
modules.automerge(off by default, in no preset). It writes.github/workflows/automerge.yml, which calls the new reusable workflowdependabot-automerge.ymlonDependabot's pull requests. The reusable workflow reads the update with
dependabot/fetch-metadata(SHA-pinned here, so this repo's Dependabot keeps it fresh) and runs
gh pr merge --autoforpatch and minor updates only. A major, or a group that holds one, stays manual.
workflow leaves auto-merge off, with a warning, when the branch requires neither, because auto-merge
would then merge before CI has run.
approval still gates the merge: the workflow never approves.
github.merge.auto_merge(maps toallow_auto_merge).github applyturns it on whilethe module is on. The module together with
auto_merge: falseis refused when the config is read.AUTOMERGE_TOKEN. With GITHUB_TOKEN, the merge's push starts noworkflow on the default branch. This is documented.
github.mergeallows: squash, then merge, then rebase.initprints a next step to rungithub apply.init -iand the playground offer the switch, andthe playground adds
github applyto the commands, with the "needs repokeeper 0.11.0" note.docs/ci-and-releases.md#dependabot-auto-merge,docs/github-settings.md.Rebased onto main after #74. The module and question order is now cache_cleanup, then automerge.
A second commit gives the slow Renovate image test in
platforms-gitlab-stacks.test.ts60 s insteadof 20 s: it runs one init per fixture (about 5 s locally) and timed out on windows-latest for #74.
Verification
npm run typecheck,biome check .,npm test(505 passed after the rebase),npm run build: all pass.node dist/cli.js initon sample node repositories withautomerge: true: one withmerge: { squash: false }(getsmerge-method: merge) and one withworkflows.source: localandcache_cleanupon as well (the reusable copy is seeded).actionlint1.7.12 reports nothing for the generated workflows or fordependabot-automerge.yml.