You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: cherry-pick DCO check fails due to author email mismatch from squash merge #1072
When the webhook server cherry-picks a squash-merged commit, the DCO check on the cherry-pick PR fails because:
GitHub squash-merge rewrites the commit author email to the noreply format (e.g., 86722603+user@users.noreply.github.com)
The Signed-off-by trailer preserves the original email (e.g., user@redhat.com)
git cherry-pick replays the commit with the mismatched emails
The DCO app checks that Signed-off-by email matches the commit author email → fails
This requires manual sign-off approval for every cherry-picked PR.
Root Cause
GitHub's squash-merge changes the commit author identity from the real email to the GitHub noreply format, but preserves the original Signed-off-by trailer verbatim. The cherry-pick faithfully reproduces this mismatch.
Solution
Add _restore_original_author_for_cherry_pick() to runner_handler.py that:
Extracts the Signed-off-by trailer from the cherry-picked commit message
Compares the sign-off email against the current commit author email
If they differ, amends the commit author to match the sign-off (restoring the original PR owner's identity)
Called after successful cherry-pick (clean or AI-resolved) before push
Deliverables
Add _restore_original_author_for_cherry_pick() method to RunnerHandler
Call it in cherry_pick() before push
Add unit tests (7 tests covering all paths)
Pass all reviewers (quality, guidelines, security, Cursor peer review)
Activity
fix: restore original author on cherry-pick for DCO compliance
fix: use commit author identity instead of sign-off name for DCO