Skip to content

Commit 79147db

Browse files
authored
Rename canUserEditRepo to canUserAdminRepo
1 parent 3c35d44 commit 79147db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,11 @@ TEST: addTests('isRepositoryActions', [
740740

741741
export const isUserTheOrganizationOwner = (): boolean => isOrganizationProfile() && exists('[aria-label="Organization"] [data-tab-item="org-header-settings-tab"]');
742742

743-
export const canUserEditRepo = (): boolean => isRepo() && exists('.reponav-item[href$="/settings"], [data-tab-item$="settings-tab"]');
743+
744+
export const canUserAdminRepo = (): boolean => isRepo() && exists('.reponav-item[href$="/settings"], [data-tab-item$="settings-tab"]');
745+
746+
/** @deprecated Use `canUserAdminRepo` */
747+
export const canUserEditRepo = canUserAdminRepo;
744748

745749
export const isNewRepo = (url: URL | HTMLAnchorElement | Location = location): boolean => url.pathname === '/new' || /^organizations\/[^/]+\/repositories\/new$/.test(getCleanPathname(url));
746750
TEST: addTests('isNewRepo', [

0 commit comments

Comments
 (0)