Skip to main content

Pull Request Reviewers

This guide outlines the code ownership of the monorepo, and the concept of default reviewers.

How code ownership works

Code owners will be added automatically to approve your PR if you change code that they own.

You may add additional reviewers to your PR, but please do not remove a default reviewer. They are there because they own the code, and because they are responsible if your change causes their application to break. Respecting their ownership is important.

The current code owner patterns are in the CODEOWNERS file in the repository root.

A **/namespace/** pattern includes changes in both apps/namespace/ and libs/namespace/.

Optional vs mandatory reviewers

We differentiate between optional and mandatory 🔒 reviewers:

Optional reviewers

An optional reviewer is always added to the PR, but is not required to approve in order for you to merge. Please note, however, that all PRs must be approved by at least one reviewer before they can be merged.

Using optional reviewers is useful when you have multiple owners, where approval from any one of those owners is sufficient.

Mandatory 🔒 reviewers

A mandatory 🔒 reviewer is required to approve before a PR can be merged.

Mandatory reviewers can be useful if you only have one code owner, or if you have files that requires a particular expertise to change, such as configuration files. It can also be used when the owner must action the change somehow, like how the reviewer of this file must change the code owner configuration when someone updates this file.

Be mindful that if mandatory reviewers are indisposed, you won't be able to merge your code, so use this option with care.

💡 Tip: A lot of developers get spammed with mails from GitLab, and may have turned them off altogether. Letting the reviewer know that you have opened a PR can be a good idea.

How to add or change reviewers

Tech leads or equivalent roles may request additions or changes to code ownership.

  1. Add the requested change to the CODEOWNERS file and open a merge request.
  2. A monorepo admin will review the change. Please ping them on Slack to make sure they are aware of the change.