Group-based Merge Request Approvals

With the Enterprise Edition, is there the ability to have Merge Request approvals be based on groups, instead of just a set number of approvals?

As an example, we have a project P that is shared by two groups of developers, Group A and Group B (each with multiple developers). We want Merge Requests to require an approver from Group A and an approver from Group B. Is this possible?

Thanks in advance!

I played around with this tonight on GitLab.com and I think your use case is possible.

You can achieve this with the Merge Request Approvals feature: https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html#merge-request-approvals

I tested it out by creating two groups on GitLab.com and creating a project in one of the groups.

Then I went to the Merge Request Approvals in “Settings” and added both groups as approvers and required 2 approvals.

What’s interesting is that initially since I am the only member of both groups and I submitted the MR, no other approvals were required. Since I am a member of both groups that’s technically approval from both groups.

So to test the use case further I added a dummy user and that led to me getting this prompt at the MR page (no change in setting required, just had to add the user)

I’m glad you asked this question, it’s a cool feature I got to learn about!

More reading (and interesting discussion in the comments, including the CEO): https://about.gitlab.com/2015/07/29/feature-highlight-merge-request-approvals/

1 Like

Just a detail that caused us a few hours of questions :

It seem you can only add a group on approve rule if you are a direct member (not inherited) of this group. At least for privates groups.