(f *cmdutil.Factory)
| 10 | ) |
| 11 | |
| 12 | func NewCmdRuleset(f *cmdutil.Factory) *cobra.Command { |
| 13 | cmd := &cobra.Command{ |
| 14 | Use: "ruleset <command>", |
| 15 | Short: "View info about repo rulesets", |
| 16 | Long: heredoc.Doc(` |
| 17 | Repository rulesets are a way to define a set of rules that apply to a repository. |
| 18 | These commands allow you to view information about them. |
| 19 | `), |
| 20 | Aliases: []string{"rs"}, |
| 21 | Example: heredoc.Doc(` |
| 22 | $ gh ruleset list |
| 23 | $ gh ruleset view --repo OWNER/REPO --web |
| 24 | $ gh ruleset check branch-name |
| 25 | `), |
| 26 | } |
| 27 | |
| 28 | cmdutil.EnableRepoOverride(cmd, f) |
| 29 | cmd.AddCommand(cmdList.NewCmdList(f, nil)) |
| 30 | cmd.AddCommand(cmdView.NewCmdView(f, nil)) |
| 31 | cmd.AddCommand(cmdCheck.NewCmdCheck(f, nil)) |
| 32 | |
| 33 | return cmd |
| 34 | } |
nothing calls this directly
no test coverage detected