MCPcopy Index your code
hub / github.com/cli/cli / NewCmdIssue

Function NewCmdIssue

pkg/cmd/issue/issue.go:23–67  ·  view source on GitHub ↗
(f *cmdutil.Factory)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

EnableRepoOverrideFunction · 0.92
AddGroupFunction · 0.92
NameMethod · 0.65

Tested by

no test coverage detected