我们如何在GitHub中执行强制性审查,但仍允许从CI构建Maven版本? [英] How can we enforce mandatory reviews in GitHub but still allow Maven release builds from CI?

查看:89
本文介绍了我们如何在GitHub中执行强制性审查,但仍允许从CI构建Maven版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想对GitHub Enterprise 2.10中的拉取请求使用强制性代码审查(使用存储库受保护的分支设置中的合并前要求拉取请求审查"功能).

We would like to use mandatory code reviews on pull requests in GitHub Enterprise 2.10 (using the "Require pull request reviews before merging" feature in the repository protected branch settings).

但是,当我们启用此功能时,Maven发行版构建会失败,因为发行版插件会尝试使用运行TeamCity发行版的用户的凭据将新的SNAPSHOT版本推送到存储库中.

However, when we enable this feature, Maven release builds fail, since the release plugin tries to push the new SNAPSHOT version to the repository using the credentials of the user that runs the TeamCity release build.

有没有人想出一种可行的方法?我们的要求是:

Has anyone come up with an approach that works for this? Our requirements are:

  • 需要对正常的提交/请求请求进行代码审查
  • 允许自动发布版本提交更新的POM版本
  • 所有提交均由特定的非共享用户帐户完成

推荐答案

我在一个相关的问题上找到了这个答案: https://stackoverflow. com/a/47006088

I found this answer on a related question: https://stackoverflow.com/a/47006088

我的印象是,如果未选中包括管理员"复选框,则可以将存储库所有者与发行插件一起使用.需要权衡的是,然后您将依靠存储库所有者的开发人员的纪律来跳过审核过程.

My impression is that if you leave the "include administrators" checkbox unchecked, then you can use a repository owner with the release plugin. The trade off is you would then rely on discipline from your developers who are repository owners to not skip the review process.

这篇关于我们如何在GitHub中执行强制性审查,但仍允许从CI构建Maven版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆