@@ -289,17 +289,22 @@ 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)' ) )
292+ if ( exists ( '#partial-discussion-header :is(.octicon-git-merge)' ) ) {
293293 return true ;
294- const status = $ ( '[class^="StateLabel"]' ) ! . textContent
295- return status === 'Merged'
296- }
294+ }
295+
296+ const status = $ ( '[class^="StateLabel"]' ) ! . textContent ;
297+ return status === 'Merged' ;
298+ } ;
299+
297300export const isClosedPR = ( ) : boolean => {
298- if ( exists ( '#partial-discussion-header :is(.octicon-git-pull-request-closed, .octicon-git-merge)' ) )
301+ if ( exists ( '#partial-discussion-header :is(.octicon-git-pull-request-closed, .octicon-git-merge)' ) ) {
299302 return true ;
300- const status = $ ( '[class^="StateLabel"]' ) ! . textContent
301- return status === 'Closed' || status === 'Merged'
302- }
303+ }
304+
305+ const status = $ ( '[class^="StateLabel"]' ) ! . textContent ;
306+ return status === 'Closed' || status === 'Merged' ;
307+ } ;
303308
304309export const isClosedIssue = ( ) : boolean => exists ( '#partial-discussion-header :is(.octicon-issue-closed, .octicon-skip)' ) ;
305310
@@ -751,7 +756,6 @@ TEST: addTests('isRepositoryActions', [
751756
752757export const isUserTheOrganizationOwner = ( ) : boolean => isOrganizationProfile ( ) && exists ( '[aria-label="Organization"] [data-tab-item="org-header-settings-tab"]' ) ;
753758
754-
755759export const canUserAdminRepo = ( ) : boolean => isRepo ( ) && exists ( '.reponav-item[href$="/settings"], [data-tab-item$="settings-tab"]' ) ;
756760
757761/** @deprecated Use `canUserAdminRepo` */
0 commit comments