如何使用 Gitlab 设置代码审查? [英] How to set up a code review using Gitlab?

查看:457
本文介绍了如何使用 Gitlab 设置代码审查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 Gitlab 设置代码审查?我看到它在 Gitlab 网站上列为一项功能,但我似乎找不到有关如何设置的说明(就此而言,任何指向 Gitlab 用户手册的链接将不胜感激).

我的一些搜索表明合并请求"是可行的方法......但我发现它们有限制.发出的合并请求会显示一个分支与另一个分支之间的所有提交.我似乎只能查看为每个单独的提交生成的差异.例如,假设我有一个要查看的文件.这是一个新文件,但我已经在 dev 分支上提交了 10 次以上的更改.如果我从集成中为该开发分支发出合并请求,我会看到 10 个提交,每个提交都显示对文件所做的增量更改......我想查看整个事情.它是新的!

我在这里叫错树了吗?是否有我可以在 GitLab 中使用的实际代码审查工具,或者合并请求是可行的方法,如果它们是我错误地使用它们?在这里设置适当的代码审查的最佳方式是什么?

解决方案

注意:从 GitLab 6.4 开始,:

<块引用>

合并请求评论移至核心

<块引用>

最初在 GitLab 11.4 中作为 GitLab Premium 功能引入,合并请求审查允许合并请求审查者:

  • 一次提交多条评论,
  • 减少合并请求作者的通知噪音,并且
  • 让审核流程更具凝聚力和简化.

<块引用>

自推出以来,我们重新评估了它在

请参阅

参见文档问题.

How does one set up a code review using Gitlab? I see it listed as a feature on the Gitlab website, but I can't seem to find instructions on how to set one up (For that matter, any link to a Gitlab user manual would be most appreciated).

Some of my searching has indicated that 'Merge Requests' are the way to go... but I'm finding them limiting. An issued merge request shows all of the commits between one branch and the other. I seem to only be able to view diffs generated for each individual commit. For example, let's say I have a file I want to review. It is a new file but I've submitted changes to it over 10 commits on a dev branch. If I issue a merge request for that dev branch from integration I see 10 commits each of which show the incremental changes made to the file... I want to review the entire thing. It is new!

Am I barking up the wrong tree here? Is there an actual code-review tool I can use in GitLab, or are merge requests the way to go, and if they are am I using them incorrectly? what's the best way to set up a proper code review here?

解决方案

Note: since GitLab 6.4, side-by-side diff view is available: see "pull request 5308".

(July 2013)There is no possibility yet to comment on each line though, only at the file level.
Daniel Sokolowski mentions in the comments that Per line comments are now supported (09/2014):

Your team members can comment on the merge request in general or on specific lines with line comments.

That still can help for code review activity.


6 years later, for GitLab 13.1 (June 2020):

Merge Request Reviews moved to Core

Originally introduced in GitLab 11.4 as a GitLab Premium feature, Merge Request Reviews allow merge request reviewers to:

  • submit multiple comments at once,
  • cutting down on notification noise for the merge request author, and
  • allowing for a more cohesive and streamlined review process.

Since its introduction, we’ve re-evaluated its place in our buyer-based pricing model and as part of 13.1 we’re excited to announce this feature has now moved to GitLab Core.

See Documentation and Issue


With GitLab 13.9 (February 2021), you also have:

Request a follow-up review from a Reviewer

Merge request authors receive feedback from reviewers. Often, this feedback needs to be re-reviewed to make sure all issues have been appropriately addressed. As the author of the contribution, you need to communicate the need for a follow-up to your reviewer.

For reviewers who have already reviewed a merge request, you can now request a re-review. This request triggers a To-Do item and email notification to alert the user that you need a follow-up review of your contribution.

See Documentation and Issue.


With GitLab 13.11 (April 2021)

Add standalone comments to merge request reviews

When you’re reviewing changes, you may want to summarize your feedback, or comment on something unrelated to the specific changes. Reviews in GitLab only allowed commenting on the changes or replying to existing comments, which meant that other kinds of comments had to be made after submitting the review.

As part of your review process, you can now submit a general comment along with your replies or change-specific comments. General comments make it simple to provide feedback to the author and use quick actions to update items across the merge request.

Thanks to Lee Tickett for the contribution!

See Documentation and Issue.

这篇关于如何使用 Gitlab 设置代码审查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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