Add check for Reviewed-By: line to merge.sh#64363
Open
sxa wants to merge 1 commit into
Open
Conversation
Signed-off-by: Stewart X Addison <sxa@ibm.com>
Collaborator
|
Review requested:
|
aduh95
reviewed
Jul 8, 2026
Comment on lines
+59
to
+63
| git log -1 HEAD --pretty='format:%B' | git interpret-trailers --parse --no-divider | \ | ||
| grep -q "^Reviewed-By: " || { | ||
| echo "No Reviewed-By: lines in the commit message" | ||
| exit 1 | ||
| } |
Contributor
There was a problem hiding this comment.
Really it should run core-validate-commit, there are many more things that could go wrong – maybe we can also document somewhere that humans are never ever supposed to write a PR-URL trailer manually
Member
Author
There was a problem hiding this comment.
I'm not sufficiently familiar with core-validate-commit to make that change but if it can be called from here then that would probably make more sense.
Member
Author
There was a problem hiding this comment.
I also considered adding an extra message to the error here (and on the PR-URL check) to say "Have you run 'git node land' first?" which would discourage an manual adding of the lines.
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.
Identified after I used
merge.shmyself and it didn't pick up the absence of theReviewed-By:linesThis will stop it happening again.