Allow only specific people or team to approve a PR #23765
-
|
Hi, 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? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 14 replies
-
|
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! |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Enable Branch Protection Rules This makes only the specified users or team members code owners for the repositoryOr specify a team
|
Beta Was this translation helpful? Give feedback.
-
|
Hi,Can I achieve it without a CODEOWNERS file? |
Beta Was this translation helpful? Give feedback.
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!