質問

My team is currently using Gerrit as code review tool for our git repos. Now we want to move some of them to GitHub. I'm not expecting to have as fine grained control over the rights as would be the case with Gerrit.

I would however like to restrict direct pushing onto master. People should first create a pull request and then have this merged by a colleague. These same people should be able to merge pull requests, so not giving them any rights on the repo is not an option.

Is this possible somehow?

役に立ちましたか?

解決

Github doesn't have fine-grain permission settings, or at least not fine enough to disallow push but allow merging pull-request. Pre-receive hooks would also allow to distinguish pushes and pull-requests, but they can't be used on GitHub. So you have two options:

  • forbid people from directly pushing to GitHub, even if technically they can
  • use GitLab along with Gitolite, which will allow much more powerful permissions, and provide the same kind of functionalities than GitHub
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top