(f *cmdutil.Factory)
| 28 | ) |
| 29 | |
| 30 | func NewCmdRepo(f *cmdutil.Factory) *cobra.Command { |
| 31 | cmd := &cobra.Command{ |
| 32 | Use: "repo <command>", |
| 33 | Short: "Manage repositories", |
| 34 | Long: `Work with GitHub repositories.`, |
| 35 | Example: heredoc.Doc(` |
| 36 | $ gh repo create |
| 37 | $ gh repo clone cli/cli |
| 38 | $ gh repo view --web |
| 39 | `), |
| 40 | Annotations: map[string]string{ |
| 41 | "help:arguments": heredoc.Doc(` |
| 42 | A repository can be supplied as an argument in any of the following formats: |
| 43 | - "OWNER/REPO" |
| 44 | - by URL, e.g. "https://github.com/OWNER/REPO" |
| 45 | `), |
| 46 | }, |
| 47 | GroupID: "core", |
| 48 | } |
| 49 | |
| 50 | cmdutil.AddGroup(cmd, "General commands", |
| 51 | repoListCmd.NewCmdList(f, nil), |
| 52 | repoCreateCmd.NewCmdCreate(f, nil), |
| 53 | ) |
| 54 | |
| 55 | cmdutil.AddGroup(cmd, "Targeted commands", |
| 56 | repoViewCmd.NewCmdView(f, nil), |
| 57 | repoCloneCmd.NewCmdClone(f, nil), |
| 58 | repoForkCmd.NewCmdFork(f, nil), |
| 59 | repoDefaultCmd.NewCmdSetDefault(f, nil), |
| 60 | repoSyncCmd.NewCmdSync(f, nil), |
| 61 | repoEditCmd.NewCmdEdit(f, nil), |
| 62 | readDirCmd.NewCmdReadDir(f, nil), |
| 63 | readFileCmd.NewCmdReadFile(f, nil), |
| 64 | deployKeyCmd.NewCmdDeployKey(f), |
| 65 | licenseCmd.NewCmdLicense(f), |
| 66 | gitIgnoreCmd.NewCmdGitIgnore(f), |
| 67 | repoRenameCmd.NewCmdRename(f, nil), |
| 68 | repoArchiveCmd.NewCmdArchive(f, nil), |
| 69 | repoUnarchiveCmd.NewCmdUnarchive(f, nil), |
| 70 | repoDeleteCmd.NewCmdDelete(f, nil), |
| 71 | creditsCmd.NewCmdRepoCredits(f, nil), |
| 72 | gardenCmd.NewCmdGarden(f, nil), |
| 73 | repoAutolinkCmd.NewCmdAutolink(f), |
| 74 | ) |
| 75 | |
| 76 | return cmd |
| 77 | } |
nothing calls this directly
no test coverage detected