diff --git a/src/commands/openAssociatedPullRequestOnRemote.ts b/src/commands/openAssociatedPullRequestOnRemote.ts index 408db58..a586bf7 100644 --- a/src/commands/openAssociatedPullRequestOnRemote.ts +++ b/src/commands/openAssociatedPullRequestOnRemote.ts @@ -40,7 +40,7 @@ export class OpenAssociatedPullRequestOnRemoteCommand extends ActiveEditorComman } try { - const repo = await getRepositoryOrShowPicker('Open Pull Request Associated', undefined, { + const repo = await getRepositoryOrShowPicker('Open Pull Request Associated', undefined, undefined, { filter: async r => (await this.container.git.getBestRemoteWithRichProvider(r.uri))?.provider != null, }); if (repo == null) return; diff --git a/src/quickpicks/repositoryPicker.ts b/src/quickpicks/repositoryPicker.ts index 260acea..ab3dbf8 100644 --- a/src/quickpicks/repositoryPicker.ts +++ b/src/quickpicks/repositoryPicker.ts @@ -13,6 +13,7 @@ export async function getBestRepositoryOrShowPicker( uri: Uri | undefined, editor: TextEditor | undefined, title: string, + placeholder?: string, options?: { filter?: (r: Repository) => Promise }, ): Promise { let repository = Container.instance.git.getBestRepository(uri, editor); @@ -24,7 +25,7 @@ export async function getBestRepositoryOrShowPicker( } if (repository != null) return repository; - const pick = await showRepositoryPicker(title, undefined, options); + const pick = await showRepositoryPicker(title, placeholder, options); if (pick instanceof CommandQuickPickItem) { await pick.execute(); return undefined; @@ -35,6 +36,7 @@ export async function getBestRepositoryOrShowPicker( export async function getRepositoryOrShowPicker( title: string, + placeholder?: string, uri?: Uri, options?: { filter?: (r: Repository) => Promise }, ): Promise { @@ -52,7 +54,7 @@ export async function getRepositoryOrShowPicker( } if (repository != null) return repository; - const pick = await showRepositoryPicker(title, undefined, options); + const pick = await showRepositoryPicker(title, placeholder, options); if (pick instanceof CommandQuickPickItem) { void (await pick.execute()); return undefined;