@@ -90,6 +90,7 @@ export class IntegrationService implements Disposable {
90
90
private async syncCloudIntegrations ( forceConnect : boolean ) {
91
91
const connectedIntegrations = new Set < IntegrationId > ( ) ;
92
92
const loggedIn = await this . container . subscription . getAuthenticationSession ( ) ;
93
+ const domains = new Map < string , string > ( ) ;
93
94
if ( loggedIn ) {
94
95
const cloudIntegrations = await this . container . cloudIntegrations ;
95
96
const connections = await cloudIntegrations ?. getConnections ( ) ;
@@ -100,10 +101,13 @@ export class IntegrationService implements Disposable {
100
101
// GKDev includes some integrations like "google" that we don't support
101
102
if ( integrationId == null ) return ;
102
103
connectedIntegrations . add ( toIntegrationId [ p . provider ] ) ;
104
+ if ( p . domain != null ) {
105
+ domains . set ( integrationId , p . domain ) ;
106
+ }
103
107
} ) ;
104
108
}
105
109
106
- for await ( const integration of this . getSupportedCloudIntegrations ( ) ) {
110
+ for await ( const integration of this . getSupportedCloudIntegrations ( domains ) ) {
107
111
await integration . syncCloudConnection (
108
112
connectedIntegrations . has ( integration . id ) ? 'connected' : 'disconnected' ,
109
113
forceConnect ,
@@ -121,9 +125,9 @@ export class IntegrationService implements Disposable {
121
125
return connectedIntegrations ;
122
126
}
123
127
124
- private async * getSupportedCloudIntegrations ( ) {
128
+ private async * getSupportedCloudIntegrations ( domains : Map < string , string > ) : AsyncIterable < Integration > {
125
129
for ( const id of getSupportedCloudIntegrationIds ( ) ) {
126
- yield this . get ( id ) ;
130
+ yield this . get ( id , domains ?. get ( id ) ) ;
127
131
}
128
132
}
129
133
@@ -437,6 +441,7 @@ export class IntegrationService implements Disposable {
437
441
await import ( /* webpackChunkName: "integrations" */ './providers/github' )
438
442
) . GitHubIntegration ( this . container , this . authenticationService , this . getProvidersApi . bind ( this ) ) ;
439
443
break ;
444
+ case SelfHostedIntegrationId . CloudGitHubEnterprise :
440
445
case SelfHostedIntegrationId . GitHubEnterprise :
441
446
if ( domain == null ) throw new Error ( `Domain is required for '${ id } ' integration` ) ;
442
447
integration = new (
@@ -446,6 +451,7 @@ export class IntegrationService implements Disposable {
446
451
this . authenticationService ,
447
452
this . getProvidersApi . bind ( this ) ,
448
453
domain ,
454
+ id ,
449
455
) ;
450
456
break ;
451
457
case HostingIntegrationId . GitLab :
0 commit comments