Add --links flag to the list command

This commit is contained in:
Miguel de la Cruz 2020-10-15 16:42:22 +02:00
parent 5810cea342
commit 5d7e67a553
2 changed files with 16 additions and 4 deletions

View file

@ -16,12 +16,14 @@ func ListCmd() *cobra.Command {
}
cmd.Flags().BoolP("published-only", "p", false, "list only published tickets")
cmd.Flags().BoolP("links", "l", false, "print full links for jira and github ticket numbers")
return cmd
}
func listCmdF(a *app.App, cmd *cobra.Command, _ []string) {
publishedOnly, _ := cmd.Flags().GetBool("published-only")
printLinks, _ := cmd.Flags().GetBool("links")
a.Campaign.PrintList(publishedOnly)
a.Campaign.PrintList(publishedOnly, printLinks)
}