Use different colors depending on the github state in list command

This commit is contained in:
Miguel de la Cruz 2020-10-07 20:09:45 +02:00
parent 8494b273dd
commit 4bed74a6f9

View file

@ -98,8 +98,12 @@ func (c *Campaign) PrintList(publishedOnly bool) {
str = fmt.Sprintf("[%s] %s", color.BlueString(t.JiraLink), t.Summary)
}
if 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 {
b, _ := json.Marshal(t)