Set approval rule as invalid if there are not enough approvers
What does this MR do and why?
This MR builds on top of !116969 (merged)
It fixes approval rules that were not marked as invalid, even though the required approvals count was higher than the number of eligible approvers. Before, the rule became invalid only when there were no approvers. Now, it checks the number of approvers against the required approvals.
Screenshots or screen recordings
How to set up and validate locally
- Add a new file, create MR
- In the approval rules for the MR, create a new rule, select 1 approver and require 2 approvals
- The rule should be marked as invalid and automatically approved
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #389905 (closed)