From 08e9cdaee18d86cb8b9e9dd7bcd3c287107fad55 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Fri, 15 May 2020 10:25:40 -0500 Subject: [PATCH] small repo fix --- command/root.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/command/root.go b/command/root.go index 8617ed1d1..b9960eb0e 100644 --- a/command/root.go +++ b/command/root.go @@ -223,17 +223,16 @@ func determineBaseRepo(apiClient *api.Client, cmd *cobra.Command, ctx context.Co return ghrepo.FromFullName(repo), nil } - baseOverride, err := cmd.Flags().GetString("repo") - if err != nil { - return nil, err - } + // TODO check to see if the git config has a default repo set; if it seems like an interactive + // environment, ask which of the resolved remotes the user wants to use as the base. if none, let + // them type one in. save in git config and then skip git resolution next time. remotes, err := ctx.Remotes() if err != nil { return nil, err } - repoContext, err := context.ResolveRemotesToRepos(remotes, apiClient, baseOverride) + repoContext, err := context.ResolveRemotesToRepos(remotes, apiClient, "") if err != nil { return nil, err }