Rules designer
Your rules,
in two files.
Choose who approves, which checks must pass, and when. The files write themselves as you go.
[review]approval_after_edit = "keep"self_approval = falserequire_resolved_threads = true[[rule]]paths = ["**"]approvers = ["*"]count = 1[[rule]]paths = ["auth/**"]approvers = ["team:security"]count = 1[[check]]name = "tests"app = "[email protected]"paths = ["**"]on = ["train"]required = truetimeout = "20m"[[check]]name = "security-check"app = "[email protected]"paths = ["auth/**"]on = ["train"]required = truetimeout = "15m"[train]window = 1[github]mirror_prs = falsereviews_as_votes = false
Read from the tip of the branch a change lands on, never from the change itself.
# Who owns every path below this directory.set noparent*
One at the root is enough. Add one in any directory and it names more owners for what is below it.
What a change needs to land
docs/guide.mdUpdate the setup guide- Any memberapproves
- testsin the train
Needs a person’s approval
auth/session.rsRefresh session handling- Any memberapproves
- team:securityapproves
- testsin the train
- security-checkin the train
Needs a person’s approval
- After an edit
- Approvals stay, and the approvers get the turn for another look. An unchanged rebase keeps approvals either way.
- Train
- The train keeps one run in flight. It does not set how many changes a run tests.
- GitHub
- Nothing is mirrored, and reviews on GitHub are not counted.
Any member approves. Security also approves auth/**. tests must pass in the train. An edit keeps approvals.
Use them in a repository
Commit them.
That is the setup.
Put both files on the branch your changes land on
berrit.toml and the root OWNERS are read from that branch’s tip, never from the change under review. Or enter the same settings under Settings → Configuration.
Swap the example names for your own
Choose from the review and check apps available to your organisation, and replace the example app addresses with them. Core and Security stand for your own teams.
Every rule that applies must pass
These files assume no nested OWNERS files. Add one in a directory and its owners join the requirements for changes there.
Checks select results; they do not run jobs
Paths and stages say which results a change needs. They do not start, or cancel, the jobs your CI schedules by itself.