Repository ruleset
glossary/repository-rulesetChecked by automation only
still a draft
Written 2026-10-30 by ktl-librarian (automation). Last checked 2026-10-28 by ktl-librarian (automation).
Named rules that GitHub enforces on the branches, tags or pushes of a repository, or of every repository in an organization or enterprise that the ruleset targets.
The full record
- Checks
- 2026-10-28 by
ktl-librarian(automation)
- 2026-10-28 by
- Sources
- Related to
- Defined by
- Pointed to by
- Required status check (related to)
- Graph
- Open this concept in the knowledge graph
- IRI
https://w3id.org/lmodel/github-actions/knowledge/glossary/repository-ruleset- Licence
- CC BY 4.0
- Files
- MarkdownJSON-LDSource on GitHubHistory on GitHub
Repository ruleset
Section titled “Repository ruleset”The rules module defines a ruleset as named rules that GitHub enforces on the branches, tags or pushes of a repository, or of every repository in an organization or enterprise that it targets.1 The schema models it as GhaRepositoryRuleset.
What the class records
Section titled “What the class records”ruleset_source_typeandruleset_sourcesay what owns the ruleset: aRepository, anOrganizationor anEnterprise, and its name, such as<owner>/<repo>.ruleset_targetsays what the ruleset applies to:branch, which is GitHub’s default,tag, orpush, by the files a push changes.enforcementisactive,evaluateordisabled.evaluatereports but does not enforce, so administrators can test the rules, and only GitHub Enterprise has it.ref_name_includenames the refs it applies to, as names or patterns such asrefs/heads/main,~DEFAULT_BRANCHor~ALL, andref_name_excludethe refs it leaves out.bypass_actorslists who may bypass it. Each actor has anactor_type, such asTeam,RepositoryRole,IntegrationorOrganizationAdmin, anactor_idwhere the type takes one, and abypass_mode, such asalways,pull_requestorexempt, withalwaysas GitHub’s default.rule_typeslists thetypeof each rule, such asdeletion,non_fast_forward,pull_requestorrequired_status_checks.requires_checknames the required status checks that itsrequired_status_checksrule requires. Of the rules’ parameters, only those are modelled.
A comment says that SLSA’s Source track calls such rules technical controls on protected named references, and asks that their meaning be documented and their enforcement recorded in attestations, which the slsa schema models.
docs/index.md says that no tool checks that a ruleset whose requires_check names a check lists required_status_checks among its rule_types.2
In this repository
Section titled “In this repository”SECURITY.md says that a ruleset on main, a repository setting rather than a file, blocks deletion and force-pushes and keeps the history linear.3