/repos/{owner}/{repo}/rulesetsCreate a repository ruleset
Creates a ruleset for a repository to apply rules when its specified conditions are met. Supply a name and enforcement level, and use target, conditions, and rules to configure where the ruleset applies and which rules it enforces. You can also configure actors that can bypass the ruleset with bypass_actors.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Repository ruleset configuration, including its target, enforcement level, bypass actors, conditions, and rules.
A 404 is returned when the repository resource is not found; a 422 is returned when validation fails or the endpoint has been spammed; a 500 is returned when an internal error occurs. name and enforcement are required, and enforcement must be disabled, active, or evaluate; target must be branch, tag, or push when provided. Each bypass_actors item must use an accepted actor_type and bypass_mode, and the owner and repo path parameters must identify the repository.