Skip to content

Commit 4c82059

Browse files
fix: OSS-GPT is enabled for all pages
1 parent 79d5780 commit 4c82059

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/helpers/get-github-repo-info.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,11 @@ export async function isRepoRoot() {
4444
* check if the repository is public
4545
*/
4646
export async function isPublicRepo() {
47-
const platform = getPlatform();
48-
if (platform === 'github') {
49-
const selector = 'meta[name="octolytics-dimension-repository_public"]';
50-
await elementReady(selector);
51-
// <meta name="octolytics-dimension-repository_public" content="true/false">
52-
const isPublic = $(selector).attr('content') === 'true';
53-
return pageDetect.isRepo() && isPublic;
54-
} else {
55-
// TODO
56-
return true;
57-
}
47+
const selector = 'meta[name="octolytics-dimension-repository_public"]';
48+
await elementReady(selector);
49+
// <meta name="octolytics-dimension-repository_public" content="true/false">
50+
const isPublic = $(selector).attr('content') === 'true';
51+
return pageDetect.isRepo() && isPublic;
5852
}
5953
export async function isPublicRepoWithMeta() {
6054
const platform = getPlatform();

0 commit comments

Comments
 (0)