Skip to content

Commit de8a85c

Browse files
filipesilvaBrocco
authored andcommitted
ci: fix fetching master into master
1 parent a5728d1 commit de8a85c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/test-commit-messages.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,17 @@ logger
3333

3434
// Note: This is based on the gulp task found in the angular/angular repository
3535
execSync('git fetch origin');
36-
// Travis doesn't have master when running jobs on other branches (minor/patch/etc).
37-
execSync('git fetch origin master:master --force');
3836

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

42+
if (currentBranch !== 'master') {
43+
// Travis doesn't have master when running jobs on other branches (minor/patch/etc).
44+
execSync('git fetch origin master:master --force');
45+
}
46+
4447
const output = execSync('git log ' + currentBranch + '..HEAD --reverse --format="%H %s" --no-merges', {
4548
encoding: 'utf-8'
4649
});

0 commit comments

Comments
 (0)