开发者

Github: Require code-review [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

Improve this question

I am the PM of a private project and I would like to do the following on github:

  1. Only I can merge branches back to the master branch or the "production" branch
  2. Every other developer must have their commits reviewed by me before I can merge their branches back to "master" or "production"

I read on github about forking and was thinking that applies to private projects because it requires a "public" url - we are not planning on releasing the source code for now, so our repos has开发者_C百科 to remain private at all times. I have seen the mentioning of the Shared Repository Model but there's no literature on that.

Can someone kindly enlighten me?


For one, any project on GitHub (private or not) is a shared repository one.
A private repo is just shared amongst a selected few collaborators.

The idea, though, would be to

  • fork that private project (this should apply for a private project too)
  • declare the developers as collaborators (they can push directly on the master of that GitHub clone project, or any other branch for that matter)
  • make them do pull requests to your initial private GitHub project

That way, you can review any patch they want you to include on the master branch of your project through the fork queue.


If by chance you're working as an Organization Github's teams are designed for this. Create an owner team with just yourself (should be default). Create a developer team, but with read only access to your main repo.

The developers can fork your private repo (forks will also be private), and can push to their forks. They cannot push to yours. So, to contribute, they push to their forks send you pull requests.


As far as I know there is no rights management for merging and branching.
Forking & Pull Requests are for seperate repositories (mainly for open soruce development).

Shared Repository Model just means that everybody has push&pull rights on one repository but uses an own branch for his edits. Only one (you) is allowed to do the merging into master. But there won't be any mechanismn to supervise this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜