ci: let a squashed Dependabot merge pass on main - #210
Merged
Conversation
GitHub composes a squash-merge message itself and appends a co-author trailer naming the pull request's author. For a Dependabot pull request that trailer names dependabot[bot], and "bot" is in the vendor list the message rules match against — so a commit that passed on the branch fails on main, where it cannot be repaired. A co-author trailer naming an allowlisted dependency bot is now dropped before the message rules are matched. Every other such trailer is matched as before, and the rest of the message is matched in full. Signed-off-by: Vyncint Ng <vyncint@icloud.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.
What & why
Merging a Dependabot pull request turns
mainred, even though the pullrequest itself is green. simt-diff hit this at
52cc142minutes after the carve-out landed.
GitHub composes the squash-merge message itself and appends a co-author
trailer naming the pull request's author. For a Dependabot pull request that
trailer names
dependabot[bot], at49699333+dependabot[bot]@users.noreply.github.com— andbotis in thevendor list the message rules match against, so the rule fires.
The identity carve-out did not help: this is the message half, which was left
strict on purpose. The result is the worst shape available — the commit passes
on the branch, fails on
main, andmainis linear and non-fast-forward, soit cannot be repaired. Exactly the failure
check-dco.shalready carries acomposed-squash exemption for.
A co-author trailer naming an allowlisted dependency bot is now dropped before
the message rules are matched. Every other such trailer is matched exactly as
before, and the rest of the message — watermarks, robot emoji, any other
vendor — is still matched in full, including on the bot's own commits.
Tested
tools/test-policy-scripts.shgains three cases. Run against the currentscript they reproduce the bug; against this one, 17/17:
other[bot]— still failsAlso run against the real commit that turned simt-diff's
mainred: rejectedby the current script, accepted by this one.
What this does not do
CHANGELOG.mdentry: not user-facing.main; that run staysred in history and goes green on the next push.
Checklist