File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -185,14 +185,20 @@ export default function RepoWikiPage() {
185
185
186
186
// Extract tokens from search params
187
187
const token = searchParams . get ( 'token' ) || '' ;
188
- const repoType = searchParams . get ( 'type' ) || 'github' ;
189
188
const localPath = searchParams . get ( 'local_path' ) ? decodeURIComponent ( searchParams . get ( 'local_path' ) || '' ) : undefined ;
190
189
const repoUrl = searchParams . get ( 'repo_url' ) ? decodeURIComponent ( searchParams . get ( 'repo_url' ) || '' ) : undefined ;
191
190
const providerParam = searchParams . get ( 'provider' ) || '' ;
192
191
const modelParam = searchParams . get ( 'model' ) || '' ;
193
192
const isCustomModelParam = searchParams . get ( 'is_custom_model' ) === 'true' ;
194
193
const customModelParam = searchParams . get ( 'custom_model' ) || '' ;
195
194
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' ;
196
202
197
203
// Import language context for translations
198
204
const { messages } = useLanguage ( ) ;
You can’t perform that action at this time.
0 commit comments