-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
pr_status.go
28 lines (23 loc) · 997 Bytes
/
pr_status.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
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/gh_completer/cmd/action"
"github.com/spf13/cobra"
)
var pr_statusCmd = &cobra.Command{
Use: "status",
Short: "Show status of relevant pull requests",
GroupID: "General commands",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(pr_statusCmd).Standalone()
pr_statusCmd.Flags().BoolP("conflict-status", "c", false, "Display the merge conflict status of each pull request")
pr_statusCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
pr_statusCmd.Flags().StringSlice("json", []string{}, "Output JSON with the specified `fields`")
pr_statusCmd.Flags().StringP("template", "t", "", "Format JSON output using a Go template; see \"gh help formatting\"")
prCmd.AddCommand(pr_statusCmd)
carapace.Gen(pr_statusCmd).FlagCompletion(carapace.ActionMap{
"json": action.ActionPullRequestFields().UniqueList(","),
})
}