From f16d95e8cd57f6238fa12b897330308ebcb59f3d Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Tue, 15 Oct 2019 15:31:32 -0700 Subject: [PATCH] small tweaks --- command/pr.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/pr.go b/command/pr.go index b6b6586ec..b637d1e95 100644 --- a/command/pr.go +++ b/command/pr.go @@ -20,13 +20,13 @@ func init() { RootCmd.AddCommand(prCmd) prCmd.AddCommand( &cobra.Command{ - Use: "list", + Use: "list k", Short: "List pull requests", RunE: prList, }, &cobra.Command{ Use: "view [pr-number]", - Short: "Open the pull request in the browser", + Short: "Open a pull request in the browser", RunE: prView, }, ) @@ -89,7 +89,7 @@ func prView(cmd *cobra.Command, args []string) error { } } else { prPayload, err := api.PullRequests() - if err != nil { + if err != nil || prPayload.CurrentPR == nil { branch := currentBranch() return fmt.Errorf("The [%s] branch has no open PRs", branch) }