/orgs/{org}/rulesetsCreate an organization repository ruleset
Creates a repository ruleset for an organization. Supply name and enforcement, and use target, bypass_actors, conditions, and rules to define where and how the ruleset applies. A 201 response returns the created organization repository ruleset with its identifier, source, conditions, rules, and timestamps.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
Organization repository ruleset definition. name and enforcement are required.
A 404 is returned when the specified organization or related resource cannot be found. A 422 is returned when name or enforcement is missing, a value violates the schema, or the endpoint has been spammed. A 500 indicates an internal error; enforcement must be one of disabled, active, or evaluate, and target must be one of branch, tag, push, or repository.
Was this helpful?