From b8edb9f62d3a467d51fdf1062af41366c5ac1111 Mon Sep 17 00:00:00 2001 From: Toshiya Doi Date: Mon, 16 Mar 2020 02:41:02 +0900 Subject: [PATCH] Show the PR state for viewing PRs in CLI --- command/pr.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/command/pr.go b/command/pr.go index 161f21263..5443cccec 100644 --- a/command/pr.go +++ b/command/pr.go @@ -296,9 +296,12 @@ func prView(cmd *cobra.Command, args []string) error { } func printPrPreview(out io.Writer, pr *api.PullRequest) error { + prStateColorFunc := colorFuncForPR(*pr) + fmt.Fprintln(out, utils.Bold(pr.Title)) + fmt.Fprintf(out, "%s", prStateColorFunc(pr.State)) fmt.Fprintln(out, utils.Gray(fmt.Sprintf( - "%s wants to merge %s into %s from %s", + " • %s wants to merge %s into %s from %s", pr.Author.Login, utils.Pluralize(pr.Commits.TotalCount, "commit"), pr.BaseRefName,