File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -892,6 +892,9 @@ TEST: addTests('isRepositoryActions', [
892892
893893export const isUserTheOrganizationOwner = ( ) : boolean => isOrganizationProfile ( ) && exists ( '[aria-label="Organization"] [data-tab-item="org-header-settings-tab"]' ) ;
894894
895+ /**
896+ * @deprecated Use canUserAccessRepoSettings or API instead.
897+ */
895898export const canUserAdminRepo = ( ) : boolean => {
896899 const repo = getRepo ( ) ;
897900 return Boolean ( repo && exists ( `:is(${ [
@@ -901,6 +904,9 @@ export const canUserAdminRepo = (): boolean => {
901904 ] . join ( ',' ) } ) a[href="/${ repo . nameWithOwner } /settings"]`) ) ;
902905} ;
903906
907+ // eslint-disable-next-line @typescript-eslint/no-deprecated
908+ export const canUserAccessRepoSettings = canUserAdminRepo ;
909+
904910export 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 ) ) ) ;
905911TEST: addTests ( 'isNewRepo' , [
906912 'https://github.com/new' ,
You can’t perform that action at this time.
0 commit comments