Use t.IsClosed() instead of raw status for the color so results match with the status command

This commit is contained in:
Miguel de la Cruz 2020-10-07 20:11:53 +02:00
parent 4bed74a6f9
commit f251e4c431

View file

@ -98,10 +98,10 @@ func (c *Campaign) PrintList(publishedOnly bool) {
str = fmt.Sprintf("[%s] %s", color.BlueString(t.JiraLink), t.Summary) str = fmt.Sprintf("[%s] %s", color.BlueString(t.JiraLink), t.Summary)
} }
if t.GithubStatus != "" { if t.GithubStatus != "" {
if t.GithubStatus == "open" { if t.IsClosed() {
str += fmt.Sprintf(" (%s)", color.GreenString(t.GithubStatus))
} else {
str += fmt.Sprintf(" (%s)", color.MagentaString(t.GithubStatus)) str += fmt.Sprintf(" (%s)", color.MagentaString(t.GithubStatus))
} else {
str += fmt.Sprintf(" (%s)", color.GreenString(t.GithubStatus))
} }
} }
fmt.Println(str) fmt.Println(str)