Show help message if no tickets in status
This commit is contained in:
parent
164f33949b
commit
52606629fb
1 changed files with 5 additions and 0 deletions
|
@ -73,6 +73,11 @@ func (c *Campaign) PrintStatus() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("Current campaign for %s with summary\n%s\n\n", color.GreenString(c.Github.Repo), color.CyanString(c.Summary))
|
fmt.Printf("Current campaign for %s with summary\n%s\n\n", color.GreenString(c.Github.Repo), color.CyanString(c.Summary))
|
||||||
|
if totalTickets == 0 {
|
||||||
|
fmt.Println("There are no tickets in the campaign. Run \"campaigner add --help\" to find out how to add them.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', tabwriter.AlignRight)
|
w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', tabwriter.AlignRight)
|
||||||
fmt.Fprintf(w, " %d\t-\ttotal tickets\t\n", totalTickets)
|
fmt.Fprintf(w, " %d\t-\ttotal tickets\t\n", totalTickets)
|
||||||
fmt.Fprintf(w, " %d\t%d%%\tpublished in Jira\t\n", totalPublishedJira, totalPublishedJira * 100 / totalTickets)
|
fmt.Fprintf(w, " %d\t%d%%\tpublished in Jira\t\n", totalPublishedJira, totalPublishedJira * 100 / totalTickets)
|
||||||
|
|
Loading…
Reference in a new issue