Automatic reviewer assignment
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
When you enable automatic reviewer assignment, GitLab assigns the
Code Owners of changed files as reviewers on a merge request.
You don’t have to select reviewers from the CODEOWNERS file by hand.
Prerequisites
- The project must have a
CODEOWNERSfile. - The Maintainer or Owner role for the project.
Enable automatic reviewer assignment
To turn on automatic reviewer assignment for a project:
- In the left sidebar, select Search or go to and find your project.
- Select Settings > Merge requests.
- Go to the Automatic reviewer assignment section.
- Select Automatically assign all code owners as reviewers.
- Select Save changes.
When GitLab assigns reviewers
After you turn on the setting, GitLab assigns Code Owners as reviewers when:
- A merge request is created in a ready state.
- A draft merge request is marked as ready.
GitLab assigns every Code Owner that matches the files changed in the merge request.
GitLab skips auto-assignment when:
- The merge request is a draft.
- The merge request already has a reviewer.
@GitLabDuois excluded from this check. - No code owner matches the files changed in the merge request.
- The merge request author does not have permission to set merge request metadata.
Reviewer assignment strategy
In projects where GitLab Duo Agent Platform recommends reviewers, the Automatic reviewer assignment section shows a Reviewer assignment strategy with these options:
- Do not assign reviewers automatically: GitLab does not change the reviewers.
- Assign all code owners as reviewers: GitLab assigns every Code Owner from the
CODEOWNERSfile that matches the changed files. - Assign reviewers with GitLab Duo Agent Platform: GitLab Duo Agent Platform recommends the minimum number of reviewers required to satisfy each approval rule.