apicheats.dev Cheat sheet Raw .md
POST

Try POST /repos/{owner}/{repo}/rulesets — GitHub API

GitHub playground

Create a repository ruleset

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

6 body fields
  • name · required · string — The name of the ruleset.
  • target · optional · string — The target of the ruleset
  • enforcement · required · string — The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).
  • bypass_actors · optional · object[] — The actors that can bypass the rules in this ruleset
  • conditions · optional · object — Parameters for a repository ruleset ref name condition
  • rules · optional · object[] — An array of rules within the ruleset.