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

Function NewCmdIssue

pkg/cmd/issue/issue.go:25–70  ·  view source on GitHub ↗
(f *cmdutil.Factory, telemetry ghtelemetry.InvocationRecorder)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

EnableRepoOverrideFunction · 0.92
AddGroupFunction · 0.92
NameMethod · 0.65

Tested by

no test coverage detected