MCPcopy
hub / github.com/cli/cli / NewCmdStatus

Function NewCmdStatus

pkg/cmd/issue/status/status.go:27–52  ·  view source on GitHub ↗
(f *cmdutil.Factory, runF func(*StatusOptions) error)

Source from the content-addressed store, hash-verified

25}
26
27func NewCmdStatus(f *cmdutil.Factory, runF func(*StatusOptions) error) *cobra.Command {
28 opts := &StatusOptions{
29 IO: f.IOStreams,
30 HttpClient: f.HttpClient,
31 Config: f.Config,
32 }
33
34 cmd := &cobra.Command{
35 Use: "status",
36 Short: "Show status of relevant issues",
37 Args: cmdutil.NoArgsQuoteReminder,
38 RunE: func(cmd *cobra.Command, args []string) error {
39 // support `-R, --repo` override
40 opts.BaseRepo = f.BaseRepo
41
42 if runF != nil {
43 return runF(opts)
44 }
45 return statusRun(opts)
46 },
47 }
48
49 cmdutil.AddJSONFlags(cmd, &opts.Exporter, api.IssueFields)
50
51 return cmd
52}
53
54var defaultFields = []string{
55 "number",

Callers 1

runCommandFunction · 0.70

Calls 2

AddJSONFlagsFunction · 0.92
statusRunFunction · 0.70

Tested by 1

runCommandFunction · 0.56