Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tools/actions/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ git log -1 HEAD^ --pretty='format:%B' | git interpret-trailers --parse --no-divi
echo "Refuse to squash and merge a PR landing in more than one commit"
exit 1
}
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
}
Comment on lines +59 to +63

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


commit_title=$(git log -1 --pretty='format:%s')
commit_body=$(git log -1 --pretty='format:%b')
Expand Down
Loading