File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,22 @@ export const hasAPIReviewRequestedLabel = (pr: PullRequest) =>
47
47
export const getPRReadyDate = ( pr : PullRequest ) => {
48
48
let readyTime = new Date ( pr . created_at ) . getTime ( ) ;
49
49
50
- if ( ! pr . labels . some ( ( l ) => l . name === API_SKIP_DELAY_LABEL ) ) {
50
+ if ( pr . labels . some ( ( l ) => l . name === API_SKIP_DELAY_LABEL ) ) {
51
+ log (
52
+ 'getPRReadyDate' ,
53
+ LogLevel . INFO ,
54
+ `${ pr . number } has "${ API_SKIP_DELAY_LABEL } " label - skipping minimum open time` ,
55
+ ) ;
56
+ } else {
51
57
const isMajorMinor = pr . labels . some ( ( l ) => isSemverMajorMinorLabel ( l . name ) ) ;
52
58
readyTime += isMajorMinor ? MINIMUM_MINOR_OPEN_TIME : MINIMUM_PATCH_OPEN_TIME ;
59
+ log (
60
+ 'getPRReadyDate' ,
61
+ LogLevel . INFO ,
62
+ `${ pr . number } has no "${ API_SKIP_DELAY_LABEL } " label - applying minimum open time for ${
63
+ isMajorMinor ? 'major/minor' : 'patch'
64
+ } `,
65
+ ) ;
53
66
}
54
67
55
68
return new Date ( readyTime ) . toISOString ( ) . split ( 'T' ) [ 0 ] ;
You can’t perform that action at this time.
0 commit comments