“提交评论”和“提交评论”有什么区别?和“立即添加评论”在 GitLab 的合并请求讨论中?

发布于 2025-01-12 17:53:42 字数 253 浏览 4 评论 0原文

我是第一次使用 GitLab 用户,在审查某人的合并请求时有点困惑。每当我添加评论时,都会收到两个选项的提示:提交评论立即添加评论

GitLab 合并请求讨论

两者有什么区别?为什么需要两个选项?

First time GitLab user and I'm a bit confused when reviewing someone's merge request. Whenever I add a comment I get prompted with two options: Submit review and Add comment now.

GitLab merge request discussion

What's the difference between the two? Why is there a need for two options?

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

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

发布评论

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

评论(2

旧梦荧光笔 2025-01-19 17:53:42

刚刚从我的同事那里听到这个消息,所以不确定这是否 100% 准确:

立即添加评论:立即将评论添加到评论中,并通知评论者评论已添加。因此,如果您选择此选项 X 次,审阅者会收到 X 次通知。

提交评论:您可以在任意数量的文件中添加任意数量的评论。如果您在审核结束时选择此选项,审核者将仅收到 1 条包含您所有评论的通知。

Just heard this from my colleagues, so not sure if this is 100% accurate:

Add comment now: instantly adds the comment to the review and notifies the reviewer that a comment has been added. So if you choose this option X times, the reviewer receives X notifications.

Submit review: You can add as many comments as you want in as many files as you want. If you choose this option at the end of your review, the reviewer will receive only 1 notification containing all of your comments.

妖妓 2025-01-19 17:53:42

另一个区别是:立即提交审核(2022 年 8 月)附带摘要。

请参阅 GitLab 15.3(2022 年 8 月)

提交合并请求审核以及摘要评论

当您完成审查合并请求时,您可能会做一些常见的事情,例如为其他人总结您的审查或批准您认为合适的更改。

这些常见任务现在变得更快更容易:当您提交评论时,您可以添加摘要评论以及任何快速操作,例如 /approve

 https://about.gitlab.com/images/15_3/create-mr-review-summary.png -- 提交合并请求审查和摘要评论

请参阅文档问题


如果您的评论是简单的“LGTM”,那么您现在可以查看 GitLab 16.0(2023 年 5 月):

评论模板

当您在问题、史诗或合并请求中发表评论时,您可能会重复自己,并且需要一遍又一遍地编写相同的评论。也许您总是需要询问有关错误报告的更多信息。也许您正在通过快速操作来应用标签,作为分类过程的一部分。或者您可能只是想用有趣的 gif 或适当的表情符号来完成所有代码审查。

An additional difference: the submit review now (Aug. 2022) comes with a summary.

See GitLab 15.3 (August 2022)

Submit merge request review with summary comment

When you finish reviewing a merge request, there are probably some common things that you do, like summarizing your review for others or approving the changes if they look good to you.

Those common tasks are now quicker and easier: when you submit your review, you can add a summary comment along with any quick actions like /approve.

https://about.gitlab.com/images/15_3/create-mr-review-summary.png -- Submit merge request review with summary comment

See Documentation and Issue.


And if your review is a simple "LGTM", you now have with See GitLab 16.0 (May 2023):

Comment templates

When you’re commenting in issues, epics, or merge requests you might repeat yourself and need to write the same comment over and over. Maybe you always need to ask for more information about a bug report. Maybe you’re applying labels via a quick action as part of a triage process. Or maybe you just like to finish all your code reviews with a funny gif or appropriate emoji. ????

Comment templates enable you to create saved responses that you can apply in comment boxes around GitLab to speed up your workflow.

To create a comment template, go to User settings > Comment templates and then fill out your template. After it’s saved, select the Insert comment template icon on any text area, and your saved response will be applied.

This is a great way to standardize your replies and save you time!

https://about.gitlab.com/images/16_0/create-comment-templates.gif -- Comment templates

See Documentation and Epic.


And GitLab 16.1 (June 2023) adds:

Comment on whole file in merge requests

Merge requests now support commenting on an entire file, because not all merge request feedback is line-specific. If a file is deleted, you might want more information about why. You might also want to provide feedback about a filename, or general comments about structure.

https://about.gitlab.com/images/16_1/create-comment-on-file-in-mr.png -- Comment on whole file in merge requests

See Documentation and Issue.

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