Skip to content

Commit

Permalink
Rename canUserEditRepo to canUserAdminRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Oct 14, 2024
1 parent 3c35d44 commit 79147db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,11 @@ TEST: addTests('isRepositoryActions', [

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

export const canUserEditRepo = (): boolean => isRepo() && exists('.reponav-item[href$="/settings"], [data-tab-item$="settings-tab"]');

Check failure on line 743 in index.ts

View workflow job for this annotation

GitHub Actions / Lint

More than 1 blank line not allowed.
export const canUserAdminRepo = (): boolean => isRepo() && exists('.reponav-item[href$="/settings"], [data-tab-item$="settings-tab"]');

/** @deprecated Use `canUserAdminRepo` */
export const canUserEditRepo = canUserAdminRepo;

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

0 comments on commit 79147db

Please sign in to comment.