Automatically merge when ready (pipelines succeed and approved)
When I create a merge request I want it to merge as soon as the pipelines succeed and the merge request is approved.
This feature essentially extends the Merge when pipeline succeeds to support approvals too.
Proposal
When creating/editing a merge request, if the user has merge permissions:
- show a checkbox to Merge when pipeline succeeds (Core) or Merge when pipeline succeeds and approved
- when a pipeline succeeds and the option is enabled, check if approval have been met, and merge
- when an approval is added, check if approval requirements have been met and pipeline has succeeded, and merge
When viewing a merge request, if the user has merge permissions:
- show a button to Merge when pipeline succeeds (Core) or Merge when pipeline succeeds and approved
- when a pipeline succeeds and the option is enabled, check if approval have been met, and merge
- when an approval is added, check if approval requirements have been met and pipeline has succeeded, and merge
Links / references
https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html