File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,16 @@ logger
3131 process . exit ( 1 ) ;
3232 } ) ;
3333
34- // Note: This is based on the gulp task found in the angular/angular repository
35- 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' ) ;
38-
3934// Get PR target branch, default to master for running locally.
4035const currentBranch = process . env . TRAVIS_BRANCH
4136 || process . env . APPVEYOR_REPO_BRANCH
4237 || 'master' ;
4338
39+ // Note: This is based on the gulp task found in the angular/angular repository
40+ execSync ( 'git fetch origin' ) ;
41+ // Travis doesn't have master when running jobs on other branches (minor/patch/etc).
42+ execSync ( `git fetch origin ${ currentBranch } :${ currentBranch } ` ) ;
43+
4444const output = execSync ( 'git log ' + currentBranch + '..HEAD --reverse --format="%H %s" --no-merges' , {
4545 encoding : 'utf-8'
4646} ) ;
@@ -52,7 +52,7 @@ if (output.length === 0) {
5252const commitsByLine = output . trim ( ) . split ( / \n / ) . map ( line => {
5353 return line . trim ( ) . split ( ' ' ) . slice ( 1 ) . join ( ' ' ) ;
5454} ) ;
55- logger . info ( `Examining ${ commitsByLine . length } commit(s) between HEAD and master ` ) ;
55+ logger . info ( `Examining ${ commitsByLine . length } commit(s) between HEAD and ${ currentBranch } ` ) ;
5656
5757const someCommitsInvalid = ! commitsByLine . every ( message => validateCommitMessage ( message ) ) ;
5858
You can’t perform that action at this time.
0 commit comments