Allow only specific people or team to approve a PR


we have private repos and we are allowing other people to have write access to the repo.

We want to be able to restrict though who is allowed to approve a PR based on member or even better a team.

We want also to have at least 3 people of the owning team to give approvals before the merge.

So, in essence, we want to differentiate between contributing teams and approving teams.

I know that in Gitlab this is possible, I assume in Github also but I cannot find this setting anywhere.

Code owners are restricted to have at least one of the approvers to be an owner but we want more…

Any idea?

Hi @mantzas! Thanks for your question.

Through protected branch settings, you can specify a minimum number of reviews from collaborators with write or admin permissions on the repo.

You can combine this with a codeowners file to ensure that at least one member of a specific team approves changes for code that they own. However it’s not possible to require that more than one member of the team in the codeowners file approves the change.

I hope this helps!

1 Like