Chapter 12: Review

Code owners

Also called CODEOWNERS

A file in the repo that maps paths to the people or teams responsible for them, so a pull request touching those paths automatically asks the right reviewer. On GitHub it can also be made a requirement for merging.

An agent is happy to edit anything it can reach, and it has no idea that the payments folder is sensitive at your company. A code owners rule turns that knowledge into something the machine enforces, whoever or whatever opened the pull request.

Say it to your agent

“Add .github/CODEOWNERS with the catch-all first, because the last match wins, then /src/payments/ for @acme/payments. Then tell me the setting to turn on so that review is required and not only requested.”

The workshop

Name a word, or describe what you mean in everyday language.