File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -127,15 +127,22 @@ function git(args) {
127
127
const statuses = await statusesResponse . json ( ) ;
128
128
for ( let i = 0 ; i < statuses . length ; i ++ ) {
129
129
const status = statuses [ i ] ;
130
- if ( status . context === 'ci/circleci' && status . state === 'success' ) {
131
- baseCIBuildId = / \/ f a c e b o o k \/ r e a c t \/ ( [ 0 - 9 ] + ) / . exec (
132
- status . target_url
133
- ) [ 1 ] ;
130
+ if ( status . context === 'ci/circleci' ) {
131
+ if ( status . state === 'success' ) {
132
+ baseCIBuildId = / \/ f a c e b o o k \/ r e a c t \/ ( [ 0 - 9 ] + ) / . exec (
133
+ status . target_url
134
+ ) [ 1 ] ;
135
+ break ;
136
+ }
137
+ if ( status . state === 'failure' ) {
138
+ warn ( `Base commit is broken: ${ baseCommit } ` ) ;
139
+ return ;
140
+ }
134
141
}
135
142
}
136
143
137
144
if ( baseCIBuildId === null ) {
138
- warn ( `Base commit is broken : ${ baseCommit } ` ) ;
145
+ warn ( `Could not find build artifacts for base commit : ${ baseCommit } ` ) ;
139
146
return ;
140
147
}
141
148
You can’t perform that action at this time.
0 commit comments