From 8fea48146dcd6845c0f4b8b390e5c38cc464c0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 8 Nov 2019 22:04:18 +0100 Subject: [PATCH] Shorter representation of successful checks in `pr status` --- command/pr.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/command/pr.go b/command/pr.go index 1103690d1..037e2892b 100644 --- a/command/pr.go +++ b/command/pr.go @@ -258,12 +258,15 @@ func printPrs(prs ...api.PullRequest) { } if checks.Total > 0 { - ratio := fmt.Sprintf("%d/%d", checks.Passing, checks.Total) + var ratio string if checks.Failing > 0 { + ratio = fmt.Sprintf("%d/%d", checks.Passing, checks.Total) ratio = utils.Red(ratio) } else if checks.Pending > 0 { + ratio = fmt.Sprintf("%d/%d", checks.Passing, checks.Total) ratio = utils.Yellow(ratio) } else if checks.Passing == checks.Total { + ratio = fmt.Sprintf("%d", checks.Total) ratio = utils.Green(ratio) } fmt.Printf(" - checks: %s", ratio)