File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -289,20 +289,12 @@ TEST: addTests('isQuickPR', [
289
289
export const isDraftPR = ( ) : boolean => exists ( '#partial-discussion-header .octicon-git-pull-request-draft' ) ;
290
290
export const isOpenPR = ( ) : boolean => exists ( '#partial-discussion-header :is(.octicon-git-pull-request, .octicon-git-pull-request-draft)' ) ;
291
291
export const isMergedPR = ( ) : boolean => {
292
- if ( exists ( '#partial-discussion-header :is(.octicon-git-merge)' ) ) {
293
- return true ;
294
- }
295
-
296
- const status = $ ( '[class^="StateLabel"]' ) ! . textContent ;
292
+ const status = ( $ ( '.State' ) || $ ( '[class^="StateLabel"]' ) ) ! . textContent ! . trim ( ) ;
297
293
return status === 'Merged' ;
298
294
} ;
299
295
300
296
export const isClosedPR = ( ) : boolean => {
301
- if ( exists ( '#partial-discussion-header :is(.octicon-git-pull-request-closed, .octicon-git-merge)' ) ) {
302
- return true ;
303
- }
304
-
305
- const status = $ ( '[class^="StateLabel"]' ) ! . textContent ;
297
+ const status = ( $ ( '.State' ) || $ ( '[class^="StateLabel"]' ) ) ! . textContent ! . trim ( ) ;
306
298
return status === 'Closed' || status === 'Merged' ;
307
299
} ;
308
300
You can’t perform that action at this time.
0 commit comments