MCPcopy Create free account
hub / github.com/cli/cli / NewCmdIssue

Function NewCmdIssue

pkg/cmd/issue/issue.go:24–68  ·  view source on GitHub ↗
(f *cmdutil.Factory, telemetry ghtelemetry.CommandRecorder)

Source from the content-addressed store, hash-verified

22)
23
24func NewCmdIssue(f *cmdutil.Factory, telemetry ghtelemetry.CommandRecorder) *cobra.Command {
25 cmd := &cobra.Command{
26 Use: "issue <command>",
27 Short: "Manage issues",
28 Long: `Work with GitHub issues.`,
29 Example: heredoc.Doc(`
30 $ gh issue list
31 $ gh issue create --label bug
32 $ gh issue view 123 --web
33 `),
34 Annotations: map[string]string{
35 "help:arguments": heredoc.Doc(`
36 An issue can be supplied as argument in any of the following formats:
37 - by number, e.g. "123"; or
38 - by URL, e.g. "https://github.com/OWNER/REPO/issues/123".
39 `),
40 },
41 GroupID: "core",
42 }
43
44 cmdutil.EnableRepoOverride(cmd, f)
45
46 cmdutil.AddGroup(cmd, "General commands",
47 cmdList.NewCmdList(f, nil),
48 cmdCreate.NewCmdCreate(f, telemetry, nil),
49 cmdStatus.NewCmdStatus(f, nil),
50 )
51
52 cmdutil.AddGroup(cmd, "Targeted commands",
53 cmdView.NewCmdView(f, nil),
54 cmdComment.NewCmdComment(f, telemetry, nil),
55 cmdClose.NewCmdClose(f, nil),
56 cmdReopen.NewCmdReopen(f, nil),
57 cmdEdit.NewCmdEdit(f, telemetry, nil),
58 cmdDevelop.NewCmdDevelop(f, nil),
59 cmdLock.NewCmdLock(f, cmd.Name(), nil),
60 cmdLock.NewCmdUnlock(f, cmd.Name(), nil),
61 cmdPin.NewCmdPin(f, nil),
62 cmdUnpin.NewCmdUnpin(f, nil),
63 cmdTransfer.NewCmdTransfer(f, nil),
64 cmdDelete.NewCmdDelete(f, nil),
65 )
66
67 return cmd
68}

Callers

nothing calls this directly

Calls 3

EnableRepoOverrideFunction · 0.92
AddGroupFunction · 0.92
NameMethod · 0.65

Tested by

no test coverage detected