TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Minding the small stuff in PR reviews

2 点作者 stepbeek超过 1 年前

1 comment

alwaysbeconsing超过 1 年前
I agree that consistency across the codebase is important for its long-term health. There&#x27;s a few things I can think of that will help you make this kind of PR comment successfully. First is that they should never block the PR from being merged, (although see second point).<p>Second is that they should be deployed judiciously: if you&#x27;re making dozens of them on one PR then something is wrong either with the PR or with you. If it&#x27;s you, then figure out which 2-5 or so (depending on the changeset size) are most important to you and let the other ones go. If it&#x27;s the PR, then pulling the author aside and working with them to understand the codebase style, and helping them push a revised changset, is a better route than carpet-bombing their PR. (And you&#x27;ll probably want to follow up that pairing beforehand for the next couple of PRs they do.)<p>Third is how to express them: the examples in the article are pretty good in this regard. Remember that these are optional improvements, and some of them can be subjective even if they&#x27;re backed by common practice in the codebase. Be friendly rather than curt with your colleagues. And give some justification for your suggestion. If you can&#x27;t come up with a good justification, it might be a sign that the comment isn&#x27;t worth making.<p>On the receiving side, also try to take the comments in a friendly spirit. It&#x27;s easy and natural to react negatively to any kind of comment on something you&#x27;ve worked on. But let that pass and don&#x27;t make it part of your outward response. And most of all try to remember the suggestions reviewers make, so that they&#x27;re not forever saying the same thing on your PRs. And if that does arise for some reason, it&#x27;s again cause for a side conversation.