ManualConfiguration
Set review requirements
A change to your deployment files might need a different reviewer from a change to the rest of your code.
Require a team for a directory
Section titled “Require a team for a directory”Say we want someone from the release team to approve changes to deployment files. Open Settings → Teams in your Berrit organisation and check which team members could give that approval. If you need a new team, create it and add its members first. Then add these rules to the root berrit.toml on the target branch, replacing release with the team’s name.
[[rule]]paths = ["**"]approvers = ["*"]count = 1
[[rule]]paths = ["deploy/**"]approvers = ["team:release"]count = 1The first rule asks for one eligible reviewer on every change. What if you edit deploy/service.yml? Both rules apply, and an eligible member of the release team can satisfy both. To require two different release reviewers, set the second rule’s count to 2.
If either Release or Operations can sign off, put both teams in the same approvers list and keep count = 1. If you need approval from each team, give each its own rule matching deploy/**. Someone who belongs to both teams can still satisfy both rules.
Choose eligible reviewers
Section titled “Choose eligible reviewers”"*"includes eligible people and named agents in the organisation. If a review app’s approval should count, name the app explicitly or include it in a team the rule names."team:release"allows members of the release team to approve. If you need a human to review the change, name a person or a team made up entirely of people.- To name one person, use their handle, such as
"@ada", or their verified email address. For a named agent, use a name such as"agent:reviewer".
By default, the author needs approval from another eligible member, and any blocking review threads must be resolved. That matters in a small team. If you’re one of two release engineers and you write the change, the other engineer can satisfy count = 1. Requiring two release approvals would leave the change waiting for someone who can’t vote on it.
Match the files you intend
Section titled “Match the files you intend”Patterns start at the repository root. deploy/* covers direct children of deploy. Use deploy/** to include its subdirectories too. A change must satisfy every rule that matches any of its paths.
Use an OWNERS file when the people who look after a directory should be able to approve changes there. For example, team:release in deploy/OWNERS adds the release team to the owners inherited from parent directories. One eligible owner from that combined list can approve an affected file. If only the local owners should count, add set noparent to stop that inheritance. The matching rules in berrit.toml still apply.