[Design] CODEOWNERS reviewer auto-assignment
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Design issue for assigning CODEOWNERS as reviewers
- Figma
- Prototype
Setting
- Introduce toggle to "Automatically assign CODEOWNERS as reviewers" under the "Require code owner approval" under "Settings / Repository / Branch rules / [branch rule]"
- When enabled then CODEOWNERS will be automatically assigned for those branches
Merge request
- When creating a merge request, the logic to map the changes to CODEOWNERS has not been done yet. This is done after the merge request is created #589700 (comment 3079986743).
- [Optional] Display message that CODEOWNERS will be assigned automatically
- When editing a merge request the CODEOWNERS has been mapped to the changes and there is a section
Code owner approval is required.- [Optional] Display message that CODEOWNERS will be assigned automatically
- When the merge request page is loaded and the merge request is
draft, no automatic assignment will happen - When the merge request page is
marked as ready,- If no reviewers assigned, then automatic assignment will be done
- If 1 or more reviewers assigned, then automatic assignment will not be done
- Assumes author has selected their reviewers for the merge request
- When there is an error assigning the reviewers, the user will see an error state and we could show a "Retry" button to try the loading process again.
Displaying a message that CODEOWNERS will be applied automatically is optional at this time because we currently don't display any information that other automations like "GitLab Duo Review" will be reviewing code automatically. One suggestion is to introduce an Automations section #589700 (comment 3080882912) to highlight these actions should we see the need for it.
Mockups
| Assigning | Assigned | Error |
|---|---|---|
|
|
|
This pattern of assigning reviewers could be extended out to the DAP scenario gitlab-org#20711.
| Code owners | Duo Agent Platform (DAP) |
|---|---|
|
|
Notes
- Why not use a skeleton loader for a reviewer?
- Michael: I couldn't find an execution that looked nice see explorations.
Edited by 🤖 GitLab Bot 🤖





