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.
isPublicRepo
1 parent e83cf88 commit 34f422dCopy full SHA for 34f422d
index.ts
@@ -360,6 +360,8 @@ export const isEmptyRepoRoot = (): boolean => isRepoHome() && !exists('link[rel=
360
361
export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork because repository is empty."]');
362
363
+export const isPublicRepo = (): boolean => Boolean(isRepo() && $('#repository-container-header .Label')!.textContent!.startsWith('Public'));
364
+
365
export const isArchivedRepo = (): boolean => Boolean(isRepo() && $('#repository-container-header .Label')!.textContent!.endsWith('archive'));
366
367
export const isBlank = (): boolean => exists('main .blankslate');
0 commit comments