/orgs/{org}/rulesetsCreate an organization repository ruleset
Creates a repository ruleset for an organization. Set the required name and enforcement, and optionally configure the target, bypass actors, conditions, and rules. Use evaluate to test rules before enforcing them; this enforcement level is available only with GitHub Enterprise.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Ruleset configuration. Include the required name and enforcement; other fields configure the target, bypass actors, conditions, and rules.
A 404 is returned when the organization resource is not found. A 422 is returned when validation fails or the endpoint has been spammed. A 500 is returned for an internal error. name and enforcement are required; enforcement must be disabled, active, or evaluate, and target must be branch, tag, push, or repository if provided. The org path parameter is the organization name and is not case-sensitive.