Perfect your code
With built-in code review tools, GitHub makes it easy to raise the quality bar before you ship. Join the 36 million developers who've merged over 200 million pull requests.
Sign up for free See pricing for teams and enterprisestools: add script to lint first PR commit message #24030
Conversation
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
added
the
tools
label
Nov 2, 2018
richardlau
referenced this pull request
Nov 2, 2018
Closed
tools: add script to lint commit messages #23758
This comment has been minimized.
This comment has been minimized.
|
Examples: Run locally, no pull request specified (script works out based on current HEAD commit):
Checking a completely different PR:
On Travis (for this PR), https://travis-ci.com/nodejs/node/jobs/155889224: |
refack
added
build
meta
labels
Nov 2, 2018
refack
reviewed
Nov 2, 2018
tools/lint-pr-commit-message.sh Outdated
richardlau
force-pushed the
richardlau:pr-commit-lint
branch
from
826115e
to
38f2b1e
Nov 2, 2018
This comment has been minimized.
This comment has been minimized.
|
Moved the Travis specific stuff out of the script back into |
This comment has been minimized.
This comment has been minimized.
|
Longer term we could teach
and then replace the shell script here with a direct call to |
refack
approved these changes
Nov 2, 2018
Trott
approved these changes
Nov 4, 2018
Trott
added
the
author ready
label
Nov 4, 2018
This comment has been minimized.
This comment has been minimized.
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Nov 4, 2018
This comment has been minimized.
This comment has been minimized.
|
Landed in 7489ee8 |
Trott
closed this
Nov 4, 2018
This comment has been minimized.
This comment has been minimized.
|
@Trott @richardlau This seems to have broken Travis CI for non-PR branches without |

richardlau commentedNov 2, 2018
Decouple first commit in pull request linting from Travis by using
the GitHub API to work out the first commit.
The shell script obtains the pull request number in one of the
following ways:
The GitHub API should be more consistent with the web UI in terms of finding
the first commit for a pull request.
This is an alternative to #23758 with the bonus that
you can run the script against any pull request number.
Checklist