-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
workflow_list.go
29 lines (24 loc) · 1.01 KB
/
workflow_list.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/gh"
"github.com/spf13/cobra"
)
var workflow_listCmd = &cobra.Command{
Use: "list",
Short: "List workflows",
Aliases: []string{"ls"},
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(workflow_listCmd).Standalone()
workflow_listCmd.Flags().BoolP("all", "a", false, "Include disabled workflows")
workflow_listCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
workflow_listCmd.Flags().StringSlice("json", []string{}, "Output JSON with the specified `fields`")
workflow_listCmd.Flags().StringP("limit", "L", "", "Maximum number of workflows to fetch")
workflow_listCmd.Flags().StringP("template", "t", "", "Format JSON output using a Go template; see \"gh help formatting\"")
workflowCmd.AddCommand(workflow_listCmd)
carapace.Gen(workflow_listCmd).FlagCompletion(carapace.ActionMap{
"json": gh.ActionWorkflowFields().UniqueList(","),
})
}