BE: Create approval rules from multiple approvers actions
Why are we doing this work
In the scope of this issue, we want to update the logic of creating approval rules from actions
in YAML to create multiple approval rules for each actions in the YAML.
Relevant links
Non-functional requirements
- Documentation:
- Feature flag:
- Performance:
- Testing:
Implementation plan
-
Update
approvals_required_exceed_approvers
inValidatePolicyService
to get approvers count from all actions.
Verification steps
- Create a project with a security policy
- Enable
multiple_approval_actions
feature flag for the project - Update the security policy with multiple approver actions:
actions:
- type: require_approval
approvals_required: 1
role_approvers:
- maintainer
- type: require_approval
approvals_required: 1
group_approvers_ids:
- 64024513
- type: send_bot_message
enabled: true
- Create an MR in the project and verify that there are 2 approval rules