From 2a8a28c43660a9e502e52d417faaff1fb7fd4d0f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 9 Oct 2018 21:51:55 -0700 Subject: [PATCH] tools: make Travis commit linting more robust Use $TRAVIS_COMMIT_RANGE in .travis.yml to avoid merge commits in some situations. Refs: https://github.com/nodejs/node/pull/23307#issuecomment-428435859 PR-URL: https://github.com/nodejs/node/pull/23397 Reviewed-By: Anna Henningsen Reviewed-By: Daniel Bevenius --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3acc2827975d63..fad2e7f0c77509 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ matrix: script: - make lint # Lint the first commit in the PR. - - git log HEAD ^$TRAVIS_BRANCH --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata + - git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata - name: "Test Suite" install: - ./configure