Show the PR state for viewing PRs in CLI
This commit is contained in:
parent
caf26e4093
commit
b8edb9f62d
1 changed files with 4 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue