Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Lau <riclau@uk.ibm.com>2018-11-02 06:55:19 +0300
committerRich Trott <rtrott@gmail.com>2018-11-04 10:22:30 +0300
commit7489ee8b6f4502d20f60b9276a1cfe86856340f2 (patch)
treeff26c57bdbf85ed812cbed50f61e6203cd7058e0 /.travis.yml
parentbb254578a65b2c9ab7274d373603327f71da7dcc (diff)
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) derived from the HEAD commit via the GitHub API PR-URL: https://github.com/nodejs/node/pull/24030 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 21ec6dab70f..dce15b7ab16 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,7 @@ matrix:
script:
- make lint
# Lint the first commit in the PR.
- - \[ -z "$TRAVIS_COMMIT_RANGE" \] || (echo -e '\nLinting the commit message according to the guidelines at https://goo.gl/p2fr5Q\n' && git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx -q core-validate-commit --no-validate-metadata)
+ - \[ "${TRAVIS_PULL_REQUEST}" != "false" \] && PR_ID=${TRAVIS_PULL_REQUEST}; bash tools/lint-pr-commit-message.sh ${PR_ID}
- name: "Test Suite"
addons:
apt: