File tree 1 file changed +4
-2
lines changed
components/server/src/projects
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -115,8 +115,10 @@ export class ProjectsService {
115
115
protected async onDidCreateProject ( project : Project , installer : User ) {
116
116
let { userId, teamId, cloneUrl } = project ;
117
117
const parsedUrl = RepoURL . parseRepoUrl ( project . cloneUrl ) ;
118
- if ( "gitlab.com" === parsedUrl ?. host ) {
119
- const repositoryService = this . hostContextProvider . get ( parsedUrl ?. host ) ?. services ?. repositoryService ;
118
+ const hostContext = parsedUrl ?. host ? this . hostContextProvider . get ( parsedUrl ?. host ) : undefined ;
119
+ const type = hostContext && hostContext . authProvider . info . authProviderType ;
120
+ if ( type === "GitLab" || type === "Bitbucket" ) {
121
+ const repositoryService = hostContext ?. services ?. repositoryService ;
120
122
if ( repositoryService ) {
121
123
// Note: For GitLab, we expect .canInstallAutomatedPrebuilds() to always return true, because earlier
122
124
// in the project creation flow, we only propose repositories where the user is actually allowed to
You can’t perform that action at this time.
0 commit comments