|
| 1 | +package cmd |
| 2 | + |
| 3 | +import ( |
| 4 | + "github.com/carapace-sh/carapace" |
| 5 | + "github.com/carapace-sh/carapace-bin/pkg/actions/tools/doing" |
| 6 | + "github.com/spf13/cobra" |
| 7 | +) |
| 8 | + |
| 9 | +var issue_listCmd = &cobra.Command{ |
| 10 | + Use: "list [OPTIONS]", |
| 11 | + Short: "List issues related to the project", |
| 12 | + Run: func(cmd *cobra.Command, args []string) {}, |
| 13 | +} |
| 14 | + |
| 15 | +func init() { |
| 16 | + carapace.Gen(issue_listCmd).Standalone() |
| 17 | + |
| 18 | + issue_listCmd.Flags().StringP("assignee", "a", "", "Filter by assignee") |
| 19 | + issue_listCmd.Flags().StringP("author", "A", "", "Filter by author") |
| 20 | + issue_listCmd.Flags().Bool("help", false, "Show this message and exit") |
| 21 | + issue_listCmd.Flags().StringP("label", "l", "", "Filter by labels") |
| 22 | + issue_listCmd.Flags().Bool("no-show_state", false, "Do not show column with work item state") |
| 23 | + issue_listCmd.Flags().Bool("no-web", false, "Open overview of issues in the web browser") |
| 24 | + issue_listCmd.Flags().StringP("output_format", "o", "", "Output format") |
| 25 | + issue_listCmd.Flags().Bool("show_state", false, "Show column with work item state") |
| 26 | + issue_listCmd.Flags().StringP("state", "s", "", "Filter by state") |
| 27 | + issue_listCmd.Flags().String("story_points", "", "Filter on number of story points") |
| 28 | + issue_listCmd.Flags().StringP("type", "t", "", "Type of work item") |
| 29 | + issue_listCmd.Flags().BoolP("web", "w", false, "Open overview of issues in the web browser") |
| 30 | + issueCmd.AddCommand(issue_listCmd) |
| 31 | + |
| 32 | + // TODO completion |
| 33 | + carapace.Gen(issue_listCmd).FlagCompletion(carapace.ActionMap{ |
| 34 | + "assignee": carapace.ActionValues(), |
| 35 | + "author": carapace.ActionValues(), |
| 36 | + "label": carapace.ActionValues(), |
| 37 | + "output_format": carapace.ActionValues("table", "array"), |
| 38 | + "state": carapace.ActionValues(), |
| 39 | + "story_points": carapace.ActionValues(), |
| 40 | + "type": doing.ActionWorkItemTypes(), |
| 41 | + }) |
| 42 | + |
| 43 | +} |
0 commit comments