diff --git a/index.ts b/index.ts index 62902d5..b41731b 100644 --- a/index.ts +++ b/index.ts @@ -349,6 +349,8 @@ export const isEmptyRepoRoot = (): boolean => isRepoHome() && !exists('link[rel= export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork because repository is empty."]'); +export const isPublicRepo = (): boolean => Boolean(isRepo() && $('#repository-container-header .Label')!.textContent!.startsWith('Public')); + export const isArchivedRepo = (): boolean => Boolean(isRepo() && $('#repository-container-header .Label')!.textContent!.endsWith('archive')); export const isBlank = (): boolean => exists('main .blankslate');