Automatic auto-merge for merge requests

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Background

Once we've created the auto-merge functionality, we ultimately want to eliminate the need to hit the merge button entirely. The process of merging code shouldn't rely on a person, but should rather "just work" once a merge request is ready.

Proposal

There's a multi-pronged approach that we'd likely want to consider here to provide flexibility and control.

  1. Add a setting to protected branches that maintainers/owners could configure to automatically auto-merge all merge requests that target those branches. This would be an opt-in behavior that would work in conjunction with protected branch settings. On an individual merge request, if it targeted a protected branch with this setting, you would not be able to turn of auto-merge.
  2. On merge requests that do not target the default branch an additional option can be added that is selected by default to auto-merge. Users could opt out individual merge requests, but the default behavior would be to auto-merge.

The thought behind control on these is that protected branches are more likely to have approvals or other items that would act as the gate so it makes sense to do this. Also because owners/maintainers are opting in, it's understood what the implications are. On non-protected branch targets it's possible there are fewer checks so merging automatically might be unexpected.

Edited Aug 27, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading