Skip to content

Commit ce5b440

Browse files
authored
Add isTemplateRepo
1 parent 1663cd9 commit ce5b440

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork becau
351351

352352
export const isArchivedRepo = (): boolean => Boolean(isRepo() && $('#repository-container-header .Label')!.textContent!.endsWith('archive'));
353353

354+
export const isTemplateRepo = (): boolean => exists('#repository-container-header .octicon-repo-template');
355+
354356
export const isBlank = (): boolean => exists('main .blankslate');
355357

356358
export const isRepoTaxonomyIssueOrPRList = (url: URL | HTMLAnchorElement | Location = location): boolean => /^labels\/.+|^milestones\/\d+(?!\/edit)/.test(getRepo(url)?.path!);

0 commit comments

Comments
 (0)