small tweaks
This commit is contained in:
parent
ef61b49575
commit
f16d95e8cd
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue