File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -152,9 +152,17 @@ class PRChecker {
152
152
const { pr } = this ;
153
153
const { cli } = this ;
154
154
const labels = pr . labels . nodes ;
155
+
156
+ let isFastTrack = false ;
155
157
const fast = labels . some ( ( l ) => isFast ( l . name ) ) ||
156
158
( labels . length === 1 && labels [ 0 ] . name === 'doc' ) ;
159
+
160
+ if ( isFastTrack ) {
161
+ cli . info ( 'This PR is being fast-tracked.' ) ;
162
+ }
163
+
157
164
if ( fast ) { return true ; }
165
+
158
166
const wait = this . getWait ( now ) ;
159
167
if ( wait . timeLeft > 0 ) {
160
168
const dateStr = new Date ( pr . createdAt ) . toDateString ( ) ;
@@ -165,7 +173,8 @@ class PRChecker {
165
173
}
166
174
167
175
function isFast ( label ) {
168
- return ( label === 'code-and-learn' || label === 'fast-track' ) ;
176
+ isFastTrack = label === 'fast-track' ;
177
+ return ( label === 'code-and-learn' || isFastTrack ) ;
169
178
}
170
179
171
180
return true ;
Original file line number Diff line number Diff line change @@ -227,9 +227,10 @@ describe('PRChecker', () => {
227
227
it ( 'should skip wait check for fast-track labelled PR' , ( ) => {
228
228
const cli = new TestCLI ( ) ;
229
229
230
- const expectedLogs = { } ;
230
+ const expectedLogs = {
231
+ info : [ [ 'This PR is being fast-tracked.' ] ]
232
+ } ;
231
233
232
- const now = new Date ( ) ;
233
234
const youngPR = Object . assign ( { } , firstTimerPR , {
234
235
createdAt : '2017-10-27T14:25:41.682Z' ,
235
236
labels : {
@@ -248,7 +249,7 @@ describe('PRChecker', () => {
248
249
collaborators
249
250
} ) ;
250
251
251
- const status = checker . checkPRWait ( now ) ;
252
+ const status = checker . checkPRWait ( new Date ( ) ) ;
252
253
assert ( status ) ;
253
254
cli . assertCalledWith ( expectedLogs ) ;
254
255
} ) ;
You can’t perform that action at this time.
0 commit comments