Skip to content

Commit b032f65

Browse files
committed
Adds placeholder string to repo pickers
1 parent f8e2f3a commit b032f65

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/commands/openAssociatedPullRequestOnRemote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class OpenAssociatedPullRequestOnRemoteCommand extends ActiveEditorComman
4040
}
4141

4242
try {
43-
const repo = await getRepositoryOrShowPicker('Open Pull Request Associated', undefined, {
43+
const repo = await getRepositoryOrShowPicker('Open Pull Request Associated', undefined, undefined, {
4444
filter: async r => (await this.container.git.getBestRemoteWithRichProvider(r.uri))?.provider != null,
4545
});
4646
if (repo == null) return;

src/quickpicks/repositoryPicker.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export async function getBestRepositoryOrShowPicker(
1313
uri: Uri | undefined,
1414
editor: TextEditor | undefined,
1515
title: string,
16+
placeholder?: string,
1617
options?: { filter?: (r: Repository) => Promise<boolean> },
1718
): Promise<Repository | undefined> {
1819
let repository = Container.instance.git.getBestRepository(uri, editor);
@@ -24,7 +25,7 @@ export async function getBestRepositoryOrShowPicker(
2425
}
2526
if (repository != null) return repository;
2627

27-
const pick = await showRepositoryPicker(title, undefined, options);
28+
const pick = await showRepositoryPicker(title, placeholder, options);
2829
if (pick instanceof CommandQuickPickItem) {
2930
await pick.execute();
3031
return undefined;
@@ -35,6 +36,7 @@ export async function getBestRepositoryOrShowPicker(
3536

3637
export async function getRepositoryOrShowPicker(
3738
title: string,
39+
placeholder?: string,
3840
uri?: Uri,
3941
options?: { filter?: (r: Repository) => Promise<boolean> },
4042
): Promise<Repository | undefined> {
@@ -52,7 +54,7 @@ export async function getRepositoryOrShowPicker(
5254
}
5355
if (repository != null) return repository;
5456

55-
const pick = await showRepositoryPicker(title, undefined, options);
57+
const pick = await showRepositoryPicker(title, placeholder, options);
5658
if (pick instanceof CommandQuickPickItem) {
5759
void (await pick.execute());
5860
return undefined;

0 commit comments

Comments
 (0)