File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -867,13 +867,12 @@ export const isUserTheOrganizationOwner = (): boolean => isOrganizationProfile()
867867
868868export const canUserAdminRepo = ( ) : boolean => {
869869 const repo = getRepo ( ) ;
870- return Boolean ( repo && exists ( [
871- ` .GlobalNav a[href="/ ${ repo . nameWithOwner } /settings"]` ,
870+ return Boolean ( repo && exists ( `:is( ${ [
871+ ' .GlobalNav' ,
872872 // Remove after June 2026
873- '.reponav-item[href$="/settings"]' ,
874- '[data-tab-item$="settings-tab"]' ,
875- ] . join ( ',' ) ) ) ;
876- }
873+ '.js-repo-nav' ,
874+ ] . join ( ',' ) } ) a[href="/${ repo . nameWithOwner } /settings"]`) ) ;
875+ } ;
877876
878877export 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 ) ) ) ;
879878TEST: addTests ( 'isNewRepo' , [
You can’t perform that action at this time.
0 commit comments