Skip to main content

org_rules

Overview

Nameorg_rules
TypeResource
Idgithub.repos.org_rules

Fields

NameDatatypeDescription
idintegerThe ID of the ruleset
namestringThe name of the ruleset
_linksobject
sourcestringThe name of the source
created_atstring
enforcementstringThe 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).
rulesarray
node_idstring
bypass_actorsarrayThe actors that can bypass the rules in this ruleset
current_user_can_bypassstringThe bypass type of the user making the API request for this ruleset. This field is only returned when
querying the repository-level endpoint.
conditionsobjectParameters for a repository ruleset ref name condition
updated_atstring
source_typestringThe type of the source of the ruleset
targetstringThe target of the ruleset

Methods

NameAccessible byRequired ParamsDescription
get_org_rulesetSELECTorg, ruleset_idGet a repository ruleset for an organization.
get_org_rulesetsSELECTorgGet all the repository rulesets for an organization.
create_org_rulesetINSERTorg, data__enforcement, data__nameCreate a repository ruleset for an organization.
delete_org_rulesetDELETEorg, ruleset_idDelete a ruleset for an organization.
update_org_rulesetEXECorg, ruleset_idUpdate a ruleset for an organization.