Skip to content

List a repo's rulesets

See every ruleset configured on a repository — the forward-compatible successor to classic branch protection, supporting multiple named rules per branch/tag pattern.

list_repo_rulesets { "owner": "<owner>", "repo": "<repo>" }
[
{ "id": 12345, "name": "main-protection", "target": "branch", "enforcement": "active" }
]

An empty array means the repo has no rulesets — check get-branch-protection.md too, since classic protection and rulesets are separate mechanisms that can each apply independently.

To see a specific ruleset’s bypass actors and full detail, pass its id to get-repo-ruleset.md.

Read-only in this plugin: creating or updating a ruleset isn’t supported yet (deliberately deferred — see explanation/architecture.md). enforcement values include active, evaluate, and disabled; a ruleset in evaluate mode reports what it would block without actually blocking anything.