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() {
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 ( ) ;
You can’t perform that action at this time.
0 commit comments