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 > > => {
@@ -596,8 +598,10 @@ export class LaunchpadProvider implements Disposable {
596598 // - cons: it's async
597599 // What do you think?
598600
599- async getPullRequestIdentityFromMaybeUrl ( search : string ) : Promise < PullRequestUrlIdentity | undefined > {
600- const connectedIntegrations = await this . getConnectedIntegrations ( ) ;
601+ async getPullRequestIdentityFromMaybeUrl (
602+ search : string ,
603+ connectedIntegrations : Map < IntegrationId , boolean > ,
604+ ) : Promise < PullRequestUrlIdentity | undefined > {
601605 for ( const integrationId of supportedLaunchpadIntegrations ) {
602606 if ( connectedIntegrations . get ( integrationId ) ) {
603607 const integration = await this . container . integrations . get ( integrationId ) ;
You can’t perform that action at this time.
0 commit comments