Skip to content

Commit 4d95e74

Browse files
authored
fix bitbucket and gitlab repo access (#279)
1 parent 28136be commit 4d95e74

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/app/[owner]/[repo]/page.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,20 @@ export default function RepoWikiPage() {
185185

186186
// Extract tokens from search params
187187
const token = searchParams.get('token') || '';
188-
const repoType = searchParams.get('type') || 'github';
189188
const localPath = searchParams.get('local_path') ? decodeURIComponent(searchParams.get('local_path') || '') : undefined;
190189
const repoUrl = searchParams.get('repo_url') ? decodeURIComponent(searchParams.get('repo_url') || '') : undefined;
191190
const providerParam = searchParams.get('provider') || '';
192191
const modelParam = searchParams.get('model') || '';
193192
const isCustomModelParam = searchParams.get('is_custom_model') === 'true';
194193
const customModelParam = searchParams.get('custom_model') || '';
195194
const language = searchParams.get('language') || 'en';
195+
const repoType = repoUrl?.includes('bitbucket.org')
196+
? 'bitbucket'
197+
: repoUrl?.includes('gitlab.com')
198+
? 'gitlab'
199+
: repoUrl?.includes('github.com')
200+
? 'github'
201+
: searchParams.get('type') || 'github';
196202

197203
// Import language context for translations
198204
const { messages } = useLanguage();

0 commit comments

Comments
 (0)