(f *cmdutil.Factory)
| 21 | ) |
| 22 | |
| 23 | func 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 | } |
nothing calls this directly
no test coverage detected