Skip to content

Commit

Permalink
tools: make Travis commit linting more robust
Browse files Browse the repository at this point in the history
Use $TRAVIS_COMMIT_RANGE in .travis.yml to avoid merge commits in some
situations.

Refs: #23307 (comment)

PR-URL: #23397
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
  • Loading branch information
Trott authored and jasnell committed Oct 17, 2018
1 parent 34253a6 commit 6ce06b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ce06b5

Please sign in to comment.