File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -865,7 +865,14 @@ TEST: addTests('isRepositoryActions', [
865865
866866export const isUserTheOrganizationOwner = ( ) : boolean => isOrganizationProfile ( ) && exists ( '[aria-label="Organization"] [data-tab-item="org-header-settings-tab"]' ) ;
867867
868- export const canUserAdminRepo = ( ) : boolean => isRepo ( ) && exists ( '.reponav-item[href$="/settings"], [data-tab-item$="settings-tab"]' ) ;
868+ export const canUserAdminRepo = ( ) : boolean => {
869+ const repo = getRepo ( ) ;
870+ return Boolean ( repo && exists ( `:is(${ [
871+ '.GlobalNav' ,
872+ // Remove after June 2026
873+ '.js-repo-nav' ,
874+ ] . join ( ',' ) } ) a[href="/${ repo . nameWithOwner } /settings"]`) ) ;
875+ } ;
869876
870877export const isNewRepo = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => ! isGist ( url ) && ( url . pathname === '/new' || / ^ o r g a n i z a t i o n s \/ [ ^ / ] + \/ r e p o s i t o r i e s \/ n e w $ / . test ( getCleanPathname ( url ) ) ) ;
871878TEST: addTests ( 'isNewRepo' , [
You can’t perform that action at this time.
0 commit comments