Uh oh!
There was an error while loading. Please reload this page.
tools: add script to lint commit messages - #23758
Conversation
There was a problem hiding this comment.
Good question. I think that's why the Travis build failed 😆 .
richardlau
commented
Oct 19, 2018
Haha, that didn't work on Travis: |
richardlau
commented
Oct 19, 2018
There was a problem hiding this comment.
Maybe use FIRST_COMMIT (or at least singular COMMIT) for clarity?
There was a problem hiding this comment.
I'd note that it only lints first commit message. (It'd stop those who don't know that from wasting their time on fixing every commit they have in the branch)
There was a problem hiding this comment.
This is the exact message currently on Travis: #23742
I'll change it here.
There was a problem hiding this comment.
Nit: there is a dot at the end, so I'd suggest to either have the dot in every echo message or in none, just for consistency.
This script attempts to guess the target upstream branch. To manually specify, e.g. to target `canary-base`: TARGET_BRANCH=canary-base bash lint-commit-message.sh
richardlau
commented
Oct 26, 2018
Addressed nits, but it looks like in the meantime my branch and master have diverged and this is now failing to properly pick up the first commit. Removed |
richardlau
commented
Nov 2, 2018
After thinking about this a bit more, I've come up with an alternative: #24030 |
Uh oh!
There was an error while loading. Please reload this page.

Currently the "first PR commit message" linting is only done on Travis. This PR attempts to
decouple the logic from Travis and capture the logic in a bash shell script so that it can be
run locally.
I haven't (yet) added the scripts to
Makefileorvcbuild.batas the script requires git, node,npm and npx being in $PATH.
Refs: #22452
Checklist