Add campaigner list command
This commit is contained in:
parent
27965460d4
commit
0cff217a8b
4 changed files with 44 additions and 0 deletions
21
cmd/list.go
Normal file
21
cmd/list.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"git.ctrlz.es/mgdelacroix/campaigner/app"
|
||||
)
|
||||
|
||||
func ListCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "list",
|
||||
Short: "Prints a list of the campaign's tickets",
|
||||
Long: "Prints a list of the campaign's tickets with their statuses and external ids",
|
||||
Args: cobra.NoArgs,
|
||||
Run: withApp(listCmdF),
|
||||
}
|
||||
}
|
||||
|
||||
func listCmdF(a *app.App, cmd *cobra.Command, _ []string) {
|
||||
a.Campaign.PrintList()
|
||||
}
|
|
@ -50,6 +50,7 @@ func RootCmd() *cobra.Command {
|
|||
// FilterCmd(),
|
||||
InitCmd(),
|
||||
LabelCmd(),
|
||||
ListCmd(),
|
||||
StatusCmd(),
|
||||
PublishCmd(),
|
||||
PullCmd(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue