We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isTemplateRepo
1 parent 1663cd9 commit ce5b440Copy full SHA for ce5b440
index.ts
@@ -351,6 +351,8 @@ export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork becau
351
352
export const isArchivedRepo = (): boolean => Boolean(isRepo() && $('#repository-container-header .Label')!.textContent!.endsWith('archive'));
353
354
+export const isTemplateRepo = (): boolean => exists('#repository-container-header .octicon-repo-template');
355
+
356
export const isBlank = (): boolean => exists('main .blankslate');
357
358
export const isRepoTaxonomyIssueOrPRList = (url: URL | HTMLAnchorElement | Location = location): boolean => /^labels\/.+|^milestones\/\d+(?!\/edit)/.test(getRepo(url)?.path!);
0 commit comments