From 88ac213a4ae24205f80c58d1fc78fb98e32bb89a Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Tue, 22 Dec 2020 23:48:32 -0500 Subject: [PATCH] Fixes remote connect/disconnect repo picker --- src/commands/remoteProviders.ts | 8 ++++++-- src/quickpicks/repositoryPicker.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/commands/remoteProviders.ts b/src/commands/remoteProviders.ts index 8feb2f7..2072cf5 100644 --- a/src/commands/remoteProviders.ts +++ b/src/commands/remoteProviders.ts @@ -60,7 +60,11 @@ export class ConnectRemoteProviderCommand extends Command { [repo, remote] = Iterables.first(repos); repoPath = repo.path; } else { - const pick = await RepositoryPicker.show('', '', [...repos.keys()]); + const pick = await RepositoryPicker.show( + undefined, + 'Choose which repository to connect to the remote provider', + [...repos.keys()], + ); if (pick?.item == null) return undefined; repoPath = pick.repoPath; @@ -145,8 +149,8 @@ export class DisconnectRemoteProviderCommand extends Command { repoPath = repo.path; } else { const pick = await RepositoryPicker.show( - 'Choose which repository to disconnect the remote on', undefined, + 'Choose which repository to disconnect from the remote provider', [...repos.keys()], ); if (pick?.item == null) return undefined; diff --git a/src/quickpicks/repositoryPicker.ts b/src/quickpicks/repositoryPicker.ts index f920d01..47c81c7 100644 --- a/src/quickpicks/repositoryPicker.ts +++ b/src/quickpicks/repositoryPicker.ts @@ -7,7 +7,7 @@ import { Iterables } from '../system'; export namespace RepositoryPicker { export async function show( - title: string, + title: string | undefined, placeholder: string = 'Choose a repository', repositories?: Repository[], ): Promise {