MCPcopy
hub / github.com/cli/cli / NewCmdRuleset

Function NewCmdRuleset

pkg/cmd/ruleset/ruleset.go:12–34  ·  view source on GitHub ↗
(f *cmdutil.Factory)

Source from the content-addressed store, hash-verified

10)
11
12func 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}

Callers

nothing calls this directly

Calls 1

EnableRepoOverrideFunction · 0.92

Tested by

no test coverage detected