Repository navigation
Conversation
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 & why
Dependabot auto-merge stopped merging anything once the org added the
Review requiredruleset on Oct 1. The merge step fails with "the base branch policy prohibits the merge" because nobody approved the PR. All seven repos that call this workflow havereview: Required, so they all hit it. Example: charge-cars-website run for PR #2.With this change, an eligible Dependabot PR merges as soon as two things are true of the same commit: its CI passed, and a person approved it. Whichever happens last triggers the merge. The workflow never approves anything itself.
How it works:
pull_request_review: submitted. The job runs for approvals of Dependabot PRs from the same repo.user.type == "User") approval whosecommit_idis that head. An approval of an older head does not count, so if Dependabot pushes a different version, that version needs its own approval.ci-workflowinput (defaultCI) and requires its latest run on the head to have passed.ci-gateis refused here too.gh pr merge --auto, but armed auto-merge outlives the commit the workflow checked and merges on required checks alone, which skipped the version and release-age guards after a Dependabot push. This session saw Dependabot change a PR from 11.6.0 to 11.6.1 during a rebase, so that case is real.Per-head
concurrencykeeps the CI run and the approval run from racing. The loser finds the PR closed and exits.Callers need the extra trigger (README shows it). Without it, nothing changes from today: CI-triggered runs still wait for an approval that never triggers a merge.
How to verify
actionlint .github/workflows/dependabot-merge.ymlshows only the SC2129 style note that is already on main.Checklist