ci(dco): ask for a sign-off on authored commits, not on merge commits - #84
Merged
Conversation
Branch protection requires a pull request to be up to date with main before it merges, and the merge commit GitHub's "Update branch" button writes carries no Signed-off-by trailer. The check counted it, so bringing a stale pull request up to date was the act that made it unmergeable. There was no way out from inside the rule. Fixing it means force-pushing a trailer onto a commit the contributor did not write, and for a pull request from a fork this repository cannot push to, nobody who can merge can also do that. It deadlocked #65 -- which had to be relanded as #83 to carry a one-line trailer -- and a0d5d73 on that same branch before it. Every fork pull request reaching main after another one merges would have hit it next. A sign-off certifies authored content. A merge commit from the update button carries none, so the check now asks for the trailer on the commits that do, the same line the upstream DCO app draws. A conflict resolved inside a merge commit becomes content the check no longer sees; the reviewable content still arrives on the authored commits either side of it. The failure message now also names the two commands that fix a genuine miss. Verified against the commit range that failed on #65 (4fb8608..01da267): it fails under the old rule and passes under the new one, while an authored commit with no trailer still fails. Signed-off-by: Fredrik Ahlgren <[email protected]>
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.
Summary
Not a driver change — this removes the deadlock that stopped #65 from merging
and would have caught the next fork pull request just the same.
Branch protection requires a pull request to be up to date with
mainbefore itmerges. The merge commit GitHub's Update branch button writes carries no
Signed-off-bytrailer, anddcocounted it. So bringing a stale pull requestup to date was the very act that made it unmergeable.
There is no way out from inside that rule. Fixing it means force-pushing a
trailer onto a commit the contributor did not write, and when the pull request
comes from a fork this repository cannot push to, nobody who can merge can also
do that. It deadlocked #65 — which had to be relanded as #83 to carry a one-line
trailer — and
a0d5d73on that same branch before it.git rev-listgains--no-merges. A sign-off certifies authored content; amerge commit from the update button carries none, so the check now asks for the
trailer on the commits that do. That is the line the upstream DCO app draws too.
The failure message also now names the two commands that fix a genuine miss.
The trade-off, stated plainly: a conflict resolved inside a merge commit is
content this check no longer sees. The reviewable content still arrives on the
authored commits either side of it, and every other check in the suite still
runs against the merged tree.
Driver evidence
catalog file is touched
Safety
Package or promotion evidence
not applicable— no package version, target, control contract or releasecandidate changes, and no artifact bytes move.
Checks
Signed-off-by.(
4fb8608..01da267): it fails under the old rule and passes under the newone.
trailer fails, including when a merge commit sits in the same range.
validate.ymlparses; all six jobs intact.Generated by Claude Code