如何让 GitHub 上不受信任的贡献者参与进来?

发布于 2024-12-18 11:46:36 字数 449 浏览 2 评论 0原文

我将邀请一家新公司为我的一个项目做出贡献,该项目目前位于 GitHub 上的私人仓库中。我以前没有与这家公司合作过,所以我想限制对我的仓库做太多事情的可能性。我考虑了以下工作流程,如果我认为方向正确,希望您发表评论。

  1. 由于我的存储库是私有的,我成立了一个团队并邀请仅具有拉取权限的新贡献者。
  2. 我为他们的任务设置了一个特定的分支,例如“new_order_form”,
  3. 我要求他们分叉我的存储库。
  4. 我要求他们签出“new_order_form”分支并提交到该分支,然后在完成后在 git-hub 中请求拉取请求。
  5. 我们的首席架构师获取分支并审查代码。如果验证后对结果感到满意,他会将分支合并到主分支并删除“new_order_form”分支。

这是最有效的工作方式吗?或者有没有办法限制他们推送到特定分支('new_order_form')并只读到主分支?

I will involve a new company to contribute to one of my projects that is currently in a private repo on GitHub. I have not worked with this company before so I would like to limit there possibility to do too much with my repo. I have the following workflow in mind and would like you comments if I think in the right direction.

  1. Since my repo is private I set up a team and invite the new contributors with pull access only.
  2. I set up a specific branch for their assignment, such as 'new_order_form'
  3. I ask them for fork my repo.
  4. I ask them to checkout the 'new_order_form' branch and do their commits to that branch and then request a pull-request in git-hub when done.
  5. Our chief architect fetch the branch and review the code. If happy with the result after verification he merge the branch into master and delete the 'new_order_form' branch.

Is this the most efficient way of working? Or is there a way to limit their push to a specific branch ('new_order_form') and read only to the master branch?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦里兽 2024-12-25 11:46:36

每个用户分叉然后只在他的存储库中工作是最常见的工作流程。然后,您的“首席架构师”从他的存储库中获取并将其集成到主存储库中。然后新人删除了他的分支,因为它已经完成了。

Every user forking and then only working in his repository is the most common workflow. Your "chief architect" then fetches from his repository and integrates it in the main repo. THe new guy then deletes his branch since it's finished.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文