X Tutup
Skip to content

Commit b8edb9f

Browse files
committed
Show the PR state for viewing PRs in CLI
1 parent caf26e4 commit b8edb9f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

command/pr.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,12 @@ func prView(cmd *cobra.Command, args []string) error {
296296
}
297297

298298
func printPrPreview(out io.Writer, pr *api.PullRequest) error {
299+
prStateColorFunc := colorFuncForPR(*pr)
300+
299301
fmt.Fprintln(out, utils.Bold(pr.Title))
302+
fmt.Fprintf(out, "%s", prStateColorFunc(pr.State))
300303
fmt.Fprintln(out, utils.Gray(fmt.Sprintf(
301-
"%s wants to merge %s into %s from %s",
304+
"%s wants to merge %s into %s from %s",
302305
pr.Author.Login,
303306
utils.Pluralize(pr.Commits.TotalCount, "commit"),
304307
pr.BaseRefName,

0 commit comments

Comments
 (0)
X Tutup