dependabot-auto-merge: retry arming, fall back to a direct merge - #23
Merged
Conversation
wemove.eu, youmove, wemove-charity.eu and pubstatic never adopted the
reusable. They each carry an inline copy that does something the reusable
did not, and it is not incidental — it handles two real failure modes:
1. `gh pr merge --auto` intermittently returns a transient GraphQL
error, stranding the PR until a human notices.
2. Auto-merge cannot be enabled on a PR whose required checks have
ALREADY passed. With fast CI the checks often win the race, and the
PR then sits green and unmerged indefinitely.
Their comment records both. Porting the retry and the direct-merge
fallback here means those four repos can drop ~20 lines each and converge
on the shared workflow instead of diverging further.
The fallback is not a bypass: branch protection still refuses a direct
merge while required checks are pending or failing. On a repo with no
required checks it merges immediately — which is why a ruleset is part of
the entry bar for using this workflow at all.
merge-method now reaches the script through env rather than `${{ }}`
interpolation, so a caller cannot inject shell through it.
Co-Authored-By: Claude Opus 5 <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.
Prerequisite for converging the last four auto-merge holdouts onto the reusable.
Why these four never adopted it
wemove.eu, youmove, wemove-charity.eu and pubstatic each carry an inline copy of
the auto-merge job. The reason is in their own comment — the inline version does
something the reusable did not:
Two distinct failure modes, both real:
gh pr merge --auto— the PR is leftunarmed and nobody finds out until someone looks.
checks frequently win the race against this workflow, and the PR then sits
green and unmerged indefinitely.
Migrating them to the reusable as it stood would have silently dropped both
protections. Porting the logic here instead lets all four drop ~20 lines and
converge.
Is the fallback a bypass?
No. Branch protection refuses a direct merge while required checks are pending or
failing — the fallback only succeeds where auto-merge was impossible because the
checks already passed.
On a repo with no required checks it would merge immediately. That is not new
(the same is true of
--autothere) and it is why a ruleset is part of the entrybar for using this workflow at all.
Also
merge-methodnow reaches the script throughenv:rather than${{ }}interpolation into the run body, so a caller cannot inject shell through it.
Release
Behaviour change, additive → v14.2.0, floating
v14moves. Existing callersget the retry with no action.
🤖 Generated with Claude Code