From 4bed74a6f94288f3a22c32beec0a7287ec793694 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Wed, 7 Oct 2020 20:09:45 +0200 Subject: [PATCH] Use different colors depending on the github state in list command --- model/campaign.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/model/campaign.go b/model/campaign.go index 7940ca0..ad9b67b 100644 --- a/model/campaign.go +++ b/model/campaign.go @@ -98,7 +98,11 @@ func (c *Campaign) PrintList(publishedOnly bool) { str = fmt.Sprintf("[%s] %s", color.BlueString(t.JiraLink), t.Summary) } if t.GithubStatus != "" { - str += fmt.Sprintf(" (%s)", color.MagentaString(t.GithubStatus)) + if t.GithubStatus == "open" { + str += fmt.Sprintf(" (%s)", color.GreenString(t.GithubStatus)) + } else { + str += fmt.Sprintf(" (%s)", color.MagentaString(t.GithubStatus)) + } } fmt.Println(str) } else if !publishedOnly {