Skip to content

tools: add script to lint first PR commit message

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:

  1. supplied on the command line (use this to test against any PR)
  2. TRAVIS_PULL_REQUEST if set and != "false"
  3. derived from the HEAD commit via the GitHub API

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 https://github.com/nodejs/node/pull/23758 with the bonus that you can run the script against any pull request number.

Checklist

Merge request reports

Loading