Skip to content

Commit 0c36c4c

Browse files
authored
Deprecate isEmptyRepo in favor of isEmptyRepoRoot
The name makes it more clear that this only matches /user/repo/ URLs
1 parent 6e1b095 commit 0c36c4c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,11 @@ collect.set('isRepo', [
239239
'https://github.com/sindresorhus/refined-github/issues/templates/edit', // Gotcha for isRepoIssueList
240240
]);
241241

242+
/** @deprecated use isEmptyRepoRoot instead */
242243
export const isEmptyRepo = (): boolean => isRepo() && exists('.blankslate');
243244

245+
export const isEmptyRepoRoot = (): boolean => isRepoRoot() && exists('.blankslate');
246+
244247
export const isRepoTaxonomyDiscussionList = (url: URL | Location = location): boolean => /^labels\/.+|^milestones\/\d+(?!\/edit)/.test(getRepoPath(url)!);
245248
collect.set('isRepoTaxonomyDiscussionList', [
246249
'https://github.com/sindresorhus/refined-github/labels/Priority%3A%20critical',
@@ -422,7 +425,7 @@ export const canUserEditOrganization = (): boolean => isOrganizationProfile() &&
422425

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

425-
/** @deprecated use canUserEditRepo */
428+
/** @deprecated use canUserEditRepo instead */
426429
export const isRepoWithAccess = canUserEditRepo;
427430

428431
const getUsername = () => document.querySelector('meta[name="user-login"]')!.getAttribute('content')!;

0 commit comments

Comments
 (0)