@@ -451,7 +451,9 @@ export class IntegrationService implements Disposable {
451
451
return key == null ? this . _connectedCache . size !== 0 : this . _connectedCache . has ( key ) ;
452
452
}
453
453
454
- get ( id : SupportedHostingIntegrationIds ) : Promise < HostingIntegration > ;
454
+ get (
455
+ id : SupportedHostingIntegrationIds | SelfHostedIntegrationId . CloudGitHubEnterprise ,
456
+ ) : Promise < HostingIntegration > ;
455
457
get ( id : SupportedIssueIntegrationIds ) : Promise < IssueIntegration > ;
456
458
get ( id : SupportedSelfHostedIntegrationIds , domain : string ) : Promise < HostingIntegration > ;
457
459
get ( id : SupportedIntegrationIds , domain ?: string ) : Promise < Integration > ;
@@ -760,8 +762,10 @@ export class IntegrationService implements Disposable {
760
762
@log < IntegrationService [ 'getMyCurrentAccounts' ] > ( {
761
763
args : { 0 : integrationIds => ( integrationIds ?. length ? integrationIds . join ( ',' ) : '<undefined>' ) } ,
762
764
} )
763
- async getMyCurrentAccounts ( integrationIds : HostingIntegrationId [ ] ) : Promise < Map < HostingIntegrationId , Account > > {
764
- const accounts = new Map < HostingIntegrationId , Account > ( ) ;
765
+ async getMyCurrentAccounts (
766
+ integrationIds : ( HostingIntegrationId | SelfHostedIntegrationId . CloudGitHubEnterprise ) [ ] ,
767
+ ) : Promise < Map < HostingIntegrationId | SelfHostedIntegrationId . CloudGitHubEnterprise , Account > > {
768
+ const accounts = new Map < HostingIntegrationId | SelfHostedIntegrationId . CloudGitHubEnterprise , Account > ( ) ;
765
769
await Promise . allSettled (
766
770
integrationIds . map ( async integrationId => {
767
771
const integration = await this . get ( integrationId ) ;
@@ -780,13 +784,16 @@ export class IntegrationService implements Disposable {
780
784
args : { 0 : integrationIds => ( integrationIds ?. length ? integrationIds . join ( ',' ) : '<undefined>' ) , 1 : false } ,
781
785
} )
782
786
async getMyPullRequests (
783
- integrationIds ?: HostingIntegrationId [ ] ,
787
+ integrationIds ?: ( HostingIntegrationId | SelfHostedIntegrationId . CloudGitHubEnterprise ) [ ] ,
784
788
cancellation ?: CancellationToken ,
785
789
silent ?: boolean ,
786
790
) : Promise < IntegrationResult < SearchedPullRequest [ ] | undefined > > {
787
791
const integrations : Map < HostingIntegration , ResourceDescriptor [ ] | undefined > = new Map ( ) ;
788
792
for ( const integrationId of integrationIds ?. length ? integrationIds : Object . values ( HostingIntegrationId ) ) {
789
- const integration = await this . get ( integrationId ) ;
793
+ let integration ;
794
+ try {
795
+ integration = await this . get ( integrationId ) ;
796
+ } catch { }
790
797
if ( integration == null ) continue ;
791
798
792
799
integrations . set ( integration , undefined ) ;
0 commit comments