From fee303699aeea4829078f4f463fed8bfe854fd85 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 5 Dec 2019 12:01:05 -0800 Subject: [PATCH] Show message when there are no PRs --- command/pr.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/pr.go b/command/pr.go index ccb5f13a7..d124c5e4f 100644 --- a/command/pr.go +++ b/command/pr.go @@ -180,6 +180,12 @@ func prList(cmd *cobra.Command, args []string) error { return err } + if len(prs) == 0 { + colorOut := colorableOut(cmd) + printMessage(colorOut, "There are no open pull requests") + return nil + } + table := utils.NewTablePrinter(cmd.OutOrStdout()) for _, pr := range prs { prNum := strconv.Itoa(pr.Number)