LinuxCommandLibrary

gh-ruleset

Manage GitHub repository rulesets and policies

TLDR

List rulesets
$ gh ruleset list
copy
View a ruleset
$ gh ruleset view [ruleset_id]
copy
Check branch rules
$ gh ruleset check [branch]
copy

SYNOPSIS

gh ruleset command [options]

DESCRIPTION

gh ruleset manages GitHub repository rulesets, which define branch protection rules, required status checks, and merge requirements. Rulesets provide more flexible and powerful protections than traditional branch protection rules.
Rulesets can target multiple branches using patterns, apply to specific repositories in an organization, or enforce organization-wide policies. The check command evaluates which rules apply to a specific branch, useful for understanding why certain operations are blocked.

PARAMETERS

-R, --repo owner/repo

Repository.
--org name
Organization.

SUBCOMMANDS

list

List rulesets.
view
View a ruleset.
check
Check rules for branch.

SEE ALSO

gh(1), gh-repo(1)

Copied to clipboard