Allow empty approval rule
- Backend weight: 1
- Frontend weight: 2
Summary
Previously it was possible to define the merge request approval requirement as:
- 3 people must approve
- 1 of the people must be person X
- 2 of the people may be any Developer in the project
This would allow any other developer to approve the merge request. With multiple approval rules this is no longer possible.
Steps to reproduce
What is the current bug behavior?
It is no longer possible to configure this
What is the expected correct behavior?
It should be possible to configure this.
Output of checks
This bug happens on GitLab.com
Possible fixes
- Make default rule always visible, in project settings and merge request form
- Rename rule to:
Any eligible user (?)
- On hover, question mark icon opens popover with the following text:
Who can be an approver? * Users or groups set as approvers in project settings or merge request. * Code owners related to merge request changes. * Any member with Developer role or higher. More information
- The “More information” links to https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html#eligible-approvers
- On hover, question mark icon opens popover with the following text:
- Remove “Edit” button from default rule
Future iterations
- If authors and/or committers are restricted from approving, they should be ommitted from the approval rule form in merge requests.
- Display a message if the no. of required approvals doesn't match the no. of eligible approvers. For example, because a member was removed from the project/group, or because authors/committers are restricted from approving their merge requests.
- The number of approvals required should be capped to the amount of people that that rule applies to (including group members). If users are deleted/removed, the approval rule can no longer be met until the no. of required approvals is changed or someone is manually added to fill in. This is important because some organizations have strict policies around the specific number of approvals.
Edited by Pedro Moreira da Silva