Add service for merge when checks pass strategy
What does this MR do and why?
Related to #407352 (closed) and #8128 (closed).
As a result of the related spike, this MR introduces a service for a new auto-merge strategy: "Merge when checks pass". The idea is to release this behind a feature flag.
It is similar to "merge when pipeline succeeds", but can also be enabled before approvals are given. When this strategy is enabled and pipeline finishes before the approvals are given, the MR gets merged with the final required approval given.
Follow-up MRs will expand on this service and add:
- update a notification email
- worker to handle the merge after approval is given
- skipping of approved checks to be able to set the auto-merge
- frontend changes and change in the preferred auto merge strategy
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.
Edited by Martin Čavoj