File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ import fs from 'mz/fs';
25
25
const root = resolve ( __dirname , '..' ) ;
26
26
const git = simpleGit ( root ) ;
27
27
28
+ const baseRef = process . env . GITHUB_PULL_REQUEST_BASE_SHA || 'master' ;
29
+ const headRef = process . env . GITHUB_PULL_REQUEST_HEAD_SHA || 'HEAD' ;
30
+
28
31
// Version bump text converted to rankable numbers.
29
32
const bumpRank : Record < string , number > = {
30
33
'patch' : 0 ,
@@ -65,10 +68,7 @@ async function getDiffData(): Promise<{
65
68
changedPackages : Set < string > ;
66
69
changesetFile : string ;
67
70
} | null > {
68
- const diff = await git . diff ( [
69
- '--name-only' ,
70
- `${ process . env . GITHUB_PULL_REQUEST_BASE_SHA } ...${ process . env . GITHUB_PULL_REQUEST_HEAD_SHA } `
71
- ] ) ;
71
+ const diff = await git . diff ( [ '--name-only' , `${ baseRef } ...${ headRef } ` ] ) ;
72
72
const changedFiles = diff . split ( '\n' ) ;
73
73
let changesetFile = '' ;
74
74
const changedPackages = new Set < string > ( ) ;
@@ -123,9 +123,7 @@ async function parseChangesetFile(changesetFile: string) {
123
123
async function main ( ) {
124
124
const errors = [ ] ;
125
125
try {
126
- await exec (
127
- `yarn changeset status --since ${ process . env . GITHUB_PULL_REQUEST_BASE_SHA } `
128
- ) ;
126
+ await exec ( `yarn changeset status --since ${ baseRef } ` ) ;
129
127
console . log ( `::set-output name=BLOCKING_FAILURE::false` ) ;
130
128
} catch ( e ) {
131
129
if ( e . message . match ( 'No changesets present' ) ) {
You can’t perform that action at this time.
0 commit comments