Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable the "Merge Button" on a merge request on Gitlab?

I have a use case where I need to disable the Merge button for all merge requests if a pipeline is running on the target( usually master) branch.

like image 283
Ashwani Avatar asked Sep 20 '25 11:09

Ashwani


1 Answers

There isn't really any way to disable to the button itself, but you can ensure that master is a protected branch (which it should be by default) and then changing or ensuring that the permissions to merge is limited to certain users or roles.

In the case where you want to prevent multiple merges to the same branch that may conflict, then consider merge trains where a merge will take into account changes from any other merges to the same branch. This is a paid feature for any private projects, but is free for public projects on GitLab.com. On a self-managed instance though it's paid only.

like image 174
Arty-chan Avatar answered Sep 22 '25 04:09

Arty-chan