10

We have a practice in our company that people can't merge their own pull requests. PRs are only allowed to be merged by reviewers.

What can we do on GitHub to enforce this?

Is there some way which would disallow people to merge their own pull request or is there something which will be a good alternative for this policy?

4
  • 1
    This is a question about GitHub and is not related to programming. You should probably ask the GitHub support team this. Commented May 25, 2014 at 18:10
  • Thanks for the tip. Is there a better place on StackExchange for this question?
    – Artem
    Commented May 25, 2014 at 18:16
  • Probably not, I would ask GitHub support. For what it's worth, I don't believe this is possible, but I'm not an expert. Commented May 25, 2014 at 18:18
  • 11
    I disagree with the current close reason on this question: "This is a question about GitHub and is not related to programming. You should probably ask the GitHub support team this." GitHub can be considered to be a software development tool, so I consider it to be on-topic for Stack Overflow.
    – user456814
    Commented May 25, 2014 at 20:11

1 Answer 1

5

This kind of policy is best managed in GitHub Organizations: it has a richer set of permissions.

You can define teams, and make the reviewer team the owner of the repo which accepts PR.

If you want the reviewer to not accept their own policy, then GitHub permissions wouldn't be enough, and you would need to put in place a listener able to alert you in that case (PR accepted by its author), using GitHub API PR Events.

3
  • It takes it further - They don't the reviewer team to accept their own PR.
    – manojlds
    Commented May 25, 2014 at 19:12
  • @manojlds I agree. There isn't much more that GitHub can do, beside alert you when that happen. I have edited my answer.
    – VonC
    Commented May 25, 2014 at 19:17
  • Official response from Github team confirms this
    – Artem
    Commented May 26, 2014 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.