块编辑器开发文档

如何让你的 Pull Request 获得评审?

💡 云策文档标注

概述

本文档针对 WordPress 开发者,提供了当 Pull Request 未获评审时的实用策略,核心在于通过简化评审过程、提供清晰上下文和主动参与社区来吸引关注。

关键要点

  • 创建最小合理的 PR:小规模 PR(如 50 行)比大规模 PR(如 2000 行)更容易快速评审和合并。
  • 分享相关上下文:明确说明问题、解决方案、所需反馈、范围限制、测试方法,并总结相关 Issues 和 PRs,以降低评审者理解成本。
  • 使 PR 引人注目:通过强调价值(如减少样板代码)、提供代码示例和视觉材料来脱颖而出。
  • 展示你的工作:在相关 Issues、PRs 和社区渠道(如 WordPress.org Slack 的 #core-editor 频道)中分享 PR 链接,并主动联系相关人员。
  • 评审他人的工作:通过评审他人的 PRs 来建立联系和获得关注。
  • 通过清晰度降低风险:明确记录风险、解决方案理由和最小化风险的方法,以减少评审摩擦。
  • 跟随关注点:专注于热门 Issues 或 WordPress 路线图中的活跃项目,以更容易吸引评审者。

📄 原文内容

Sometimes we publish a Pull Request and no one reviews our work. What to do?

Attracting a review largely isn’t about the code – it is about making the reviewing easy.

If you published a Pull Request that isn’t getting any comments or reviews, try one of the strategies used by core contributors:

Create the smallest reasonable PRs

Approving a 2000-line-long PR takes months and feels overwhelming.

Approving a 50-line long PR takes days or hours and feels easy.

Large batches slow you down. Ship your work in small chunks to merge more and learn faster.

Share relevant context:

Clarify:
* What problem are you solving?
* How does your PR solve it?
* What feedback do you need?
* What’s out of scope?
* What’s unintuitive?
* How to test?

Summarize any related issues and PRs.

It’s easier than asking others to go and figure it out.

Make your PR exciting

All contributions are competing for attention. Make your stand out.

The easiest way? Say why it matters:

❌ A new react hook to get data
useEntityRecord: get data with 10x less boilerplate

Then prove it with code examples, visuals, and screencasts.

Show your work

Post a link to your PR in related issues & PRs.

Ping commenters of related issues, previous committers, and tech leads.

Bring it up on the #core-editor channel of the WordPress.org slack. The easiest way to get feedback is to speak out during the open floor section of the weekly Core Editor meeting.

Assign relevant labels, milestones, and projects (or ask someone).

Review the work of others

It’s the easiest way to get on others’ radar.

Look up the PRs of commenters of related issues, previous committers, and tech leads. Then review them.

Is their work unfamiliar? Do:

  • Take some time to understand it
  • Propose a pair programming session
  • Skip, go for the next PR

Reduce risk with clarity

Risk adds friction – an approval can backfire later.

Clarity is like grease. Clearly document:

  • What risks are involved? Why take them?
  • Why is this PR the best solution?
  • How can the risk be minimized?
  • What else has been tried?

Follow the attention

Some PRs naturally get more traction than others.

Double down on these.

Some Issues are more topical than others (e.g. those listed in the goals for an upcoming release) and thus will garner more attention. By focusing on these it will be easier to attract reviewers.

How to get there quickly? Help with an active project from the WordPress roadmap