File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -214,14 +214,16 @@ export class LaunchpadProvider implements Disposable {
214
214
}
215
215
216
216
private async getSearchedPullRequests ( search : string , cancellation ?: CancellationToken ) {
217
- const prUrlIdentity : PullRequestUrlIdentity | undefined = await this . getPullRequestIdentityFromSearch ( search ) ;
217
+ const connectedIntegrations = await this . getConnectedIntegrations ( ) ;
218
+ const prUrlIdentity : PullRequestUrlIdentity | undefined = await this . getPullRequestIdentityFromSearch (
219
+ search ,
220
+ connectedIntegrations ,
221
+ ) ;
218
222
const result : { readonly value : SearchedPullRequest [ ] ; duration : number } = {
219
223
value : [ ] ,
220
224
duration : 0 ,
221
225
} ;
222
226
223
- const connectedIntegrations = await this . getConnectedIntegrations ( ) ;
224
-
225
227
const findByPrIdentity = async (
226
228
integration : HostingIntegration ,
227
229
) : Promise < undefined | TimedResult < SearchedPullRequest [ ] | undefined > > => {
@@ -589,8 +591,10 @@ export class LaunchpadProvider implements Disposable {
589
591
) ;
590
592
}
591
593
592
- async getPullRequestIdentityFromSearch ( search : string ) : Promise < PullRequestUrlIdentity | undefined > {
593
- const connectedIntegrations = await this . getConnectedIntegrations ( ) ;
594
+ async getPullRequestIdentityFromSearch (
595
+ search : string ,
596
+ connectedIntegrations : Map < IntegrationId , boolean > ,
597
+ ) : Promise < PullRequestUrlIdentity | undefined > {
594
598
for ( const integrationId of supportedLaunchpadIntegrations ) {
595
599
if ( connectedIntegrations . get ( integrationId ) ) {
596
600
const integration = await this . container . integrations . get ( integrationId ) ;
You can’t perform that action at this time.
0 commit comments