Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/test-commit-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ execSync('git fetch origin');
// Travis doesn't have master when running jobs on other branches (minor/patch/etc).
execSync('git fetch origin master:master');

// Get PR target branch, default to master for running locally.
const currentBranch = process.env.TRAVIS_BRANCH
|| process.env.APPVEYOR_REPO_BRANCH
|| 'master';

const output = execSync('git log master.. --reverse --format="%H %s" --no-merges', {
const output = execSync('git log ' + currentBranch + '..HEAD --reverse --format="%H %s" --no-merges', {
encoding: 'utf-8'
});

Expand Down