apicheats.dev Cheat sheet Raw .md
PUT

Try PUT /orgs/{org}/rulesets/{ruleset_id} — GitHub API

GitHub playground

Update an organization 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 · optional · string — The name of the ruleset.
  • target · optional · string — The target of the ruleset
  • enforcement · optional · 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 — Conditions for an organization ruleset. The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties. The push rulesets conditions object does not require the `ref_name` property. For repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`.
  • rules · optional · object[] — An array of rules within the ruleset.