Skip to content

Commit 36b825e

Browse files
authored
Earlier detection for isPublicRepo (#159)
1 parent f666c7d commit 36b825e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export const isEmptyRepoRoot = (): boolean => isRepoHome() && !exists('link[rel=
362362

363363
export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork because repository is empty."]');
364364

365-
export const isPublicRepo = (): boolean => Boolean(isRepo() && $('#repository-container-header .Label')!.textContent!.startsWith('Public'));
365+
export const isPublicRepo = (): boolean => exists('meta[name="octolytics-dimension-repository_public"][content="true"]');
366366

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

0 commit comments

Comments
 (0)