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', [
289289export const isDraftPR = ( ) : boolean => exists ( '#partial-discussion-header .octicon-git-pull-request-draft' ) ;
290290export const isOpenPR = ( ) : boolean => exists ( '#partial-discussion-header :is(.octicon-git-pull-request, .octicon-git-pull-request-draft)' ) ;
291291export 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 ( ) ;
297293 return status === 'Merged' ;
298294} ;
299295
300296export 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 ( ) ;
306298 return status === 'Closed' || status === 'Merged' ;
307299} ;
308300
You can’t perform that action at this time.
0 commit comments