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 {
214214 }
215215
216216 private async getSearchedPullRequests ( search : string , cancellation ?: CancellationToken ) {
217- const prUrlIdentity : PullRequestUrlIdentity | undefined = await this . getPullRequestIdentityFromMaybeUrl ( search ) ;
217+ const connectedIntegrations = await this . getConnectedIntegrations ( ) ;
218+ const prUrlIdentity : PullRequestUrlIdentity | undefined = await this . getPullRequestIdentityFromMaybeUrl (
219+ search ,
220+ connectedIntegrations ,
221+ ) ;
218222 const result : { readonly value : SearchedPullRequest [ ] ; duration : number } = {
219223 value : [ ] ,
220224 duration : 0 ,
221225 } ;
222226
223- const connectedIntegrations = await this . getConnectedIntegrations ( ) ;
224-
225227 const findByPrIdentity = async (
226228 integration : HostingIntegration ,
227229 ) : Promise < undefined | TimedResult < SearchedPullRequest [ ] | undefined > > => {
@@ -589,8 +591,10 @@ export class LaunchpadProvider implements Disposable {
589591 ) ;
590592 }
591593
592- async getPullRequestIdentityFromMaybeUrl ( search : string ) : Promise < PullRequestUrlIdentity | undefined > {
593- const connectedIntegrations = await this . getConnectedIntegrations ( ) ;
594+ async getPullRequestIdentityFromMaybeUrl (
595+ search : string ,
596+ connectedIntegrations : Map < IntegrationId , boolean > ,
597+ ) : Promise < PullRequestUrlIdentity | undefined > {
594598 for ( const integrationId of supportedLaunchpadIntegrations ) {
595599 if ( connectedIntegrations . get ( integrationId ) ) {
596600 const integration = await this . container . integrations . get ( integrationId ) ;
You can’t perform that action at this time.
0 commit comments