简体   繁体   English

Gitlab 合并请求何时批准

[英]Gitlab Merge Request When To Approve

So we're having a little bit of a debate where I work as to what point should a reviewer "Approve" a Merge Request.因此,我们正在就审阅者应该“批准”合并请求的哪一点进行讨论。

We have setup some Gitlab Pipelines to run and carry out what I would say are fairly standard stuff (Build, Automated Tests, Sonar etc) .我们已经设置了一些 Gitlab 管道来运行和执行我所说的相当标准的东西(构建、自动化测试、声纳等) Now we're trying to improve best practises across the department and a debate has started as to when the reviewer(s) should actually "Approve" the Merge Request.现在,我们正在尝试改进整个部门的最佳实践,并且已经开始讨论审阅者应该何时真正“批准”合并请求。

We have the 1 argument that says the Pipeline acts as an "Approver" itself and if it fails it basically should prevent the Merge Request from happening, so it doesn't matter when the reviewer(s) hit that "Approve" button, because the reviewer(s) are reviewing the Code and not the pipeline.我们有 1 个参数表示管道本身充当“批准者”,如果它失败了,它基本上应该阻止合并请求的发生,因此审阅者何时点击“批准”按钮并不重要,因为审查者正在审查代码而不是管道。

And then you have another argument that says the reviewer(s) should not be "Approving" until the Pipeline passes, and they should be dependent on the Pipeline passing as to whether they should be "Approving" the Merge Request or not.然后你有另一个论点,说审阅者在管道通过之前不应该“批准”,并且他们应该依赖于管道传递来决定他们是否应该“批准”合并请求。

So should the reviewer(s) of a Merge Request wait until the the Gitlab Pipeline finishes and if the pipeline is successful then "Approve" or should they be able to "Approve" once they have reviewed the code, no matter if the pipeline has finished or not?因此,合并请求的审阅者是否应该等到 Gitlab 管道完成,如果管道成功则“批准”,或者他们应该能够在审阅代码后“批准”,无论管道是否有完成与否?

It's best practice to wait until the pipeline passes, review the code and then do an approval.最佳做法是等到管道通过,审查代码然后进行批准。 If the pipeline doesn't pass in the first place, there is an issue and the developer needs to fix his/her PR before someone spends time to review it.如果管道一开始没有通过,那么就有问题了,开发人员需要在有人花时间审查之前修复他/她的 PR。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么 Gitlab 在您批准合并请求时会自动将目标分支合并到源分支? 如何禁用此行为? - Why Gitlab automatically merge target branch into source branch when you approve a merge request? How to disable this behaviour? 接受合并请求后禁用 gitlab 管道 - disable gitlab pipeline after merge request is accepted GitLab API 将内联评论发布到合并请求 - GitLab API to post inline comment to Merge Request 为什么我在 Gitlab 版本 14.95 中尝试推送合并请求命令时看到“未知开关”错误? - Why am I seeing an 'unknown switch' error when attempting to push a merge request command in Gitlab version 14.95? 使用 Bash 和 cURL 通过 CI/CD 管道进入时生成 GitLab 合并请求 - Generate GitLab Merge Request when a push comes in via CI/CD Pipeline using Bash and cURL 在 GitLab 中为合并请求设置默认审阅者 - Set default reviewers for merge request in GitLab Gitlab CI 根据合并请求自动运行管道 - Gitlab CI automatical run pipeline on merge request GitLab 的合并请求讨论中的“提交评论”和“立即添加评论”有什么区别? - What's the difference between "Submit review" and "Add comment now" in GitLab's merge request discussions? 从使用 Gitlab Web 编辑器删除的合并请求中删除跟踪文件 - Remove tracked file from Merge Request that was deleted using Gitlab Web Editor 如何对 Gitlab URL 进行反向工程以指向合并请求中的某个代码行号 - How to reverse engineer a Gitlab URL to point to a certain code line number in a Merge Request
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM