Skip to content

Automatically merge when ready (merge checks and approvals complete)

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

Walkthrough

https://www.loom.com/share/f66eb5321d7a4cb78ff2ed48b2d9612c

Links / references

https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html

Edited by Matthew Nearents