Don't list remotes when --repo flag is set
This commit is contained in:
parent
58f6bef8a7
commit
45c2a16d49
4 changed files with 23 additions and 10 deletions
|
|
@ -85,7 +85,8 @@ func issueList(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
baseRepo, err := determineBaseRepo(cmd, ctx)
|
||||
repo, _ := cmd.Flags().GetString("repo")
|
||||
baseRepo, err := determineBaseRepo(cmd, ctx, repo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -165,7 +166,8 @@ func issueStatus(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
baseRepo, err := determineBaseRepo(cmd, ctx)
|
||||
repo, _ := cmd.Flags().GetString("repo")
|
||||
baseRepo, err := determineBaseRepo(cmd, ctx, repo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -222,7 +224,8 @@ func issueView(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
baseRepo, err := determineBaseRepo(cmd, ctx)
|
||||
repo, _ := cmd.Flags().GetString("repo")
|
||||
baseRepo, err := determineBaseRepo(cmd, ctx, repo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -294,8 +297,9 @@ func issueFromArg(apiClient *api.Client, baseRepo ghrepo.Interface, arg string)
|
|||
func issueCreate(cmd *cobra.Command, args []string) error {
|
||||
ctx := contextForCommand(cmd)
|
||||
|
||||
repoOverride, _ := cmd.Flags().GetString("repo")
|
||||
// NB no auto forking like over in pr create
|
||||
baseRepo, err := determineBaseRepo(cmd, ctx)
|
||||
baseRepo, err := determineBaseRepo(cmd, ctx, repoOverride)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue