devlk
c/learning u/devlk Team

How do I write a pull request that gets reviewed quickly?

Team FAQ: this question comes up often, so we've answered it below. Add your own experience, or a different view, in the comments.

Your pull requests sit for days waiting for review, or come back with many rounds of comments. How do you make them easier to review?

2
1 comment
No account needed: you'll get a random guest name, kept on this device. Or sign up to choose yours.
Sort by: Best Top New Old
devlk Team·

Reviewers are busy. Make your pull request small, clear and easy to say yes to.

1. Keep it small. Aim for one change that someone can review in 15 to 20 minutes. A few hundred changed lines gets a careful review; two thousand lines gets "LGTM" or gets ignored. Split big work into a sequence of PRs (for example: refactor first, then the feature).

2. Write a useful description. A template that works:

## What
Adds retry with backoff when the SMS provider times out.

## Why
About 2% of OTP messages failed during provider outages (see #231).

## How to test
1. Set SMS_PROVIDER_URL to the mock server
2. Run `npm test -- sms`
3. Trigger a login; the OTP should arrive after one retry

## Notes
Retries are capped at 3. Open question: should we alert after the final failure?

Add screenshots or a short screen recording for UI changes.

3. Review it yourself first. Read your own diff on GitHub before requesting review. You'll catch debug logs, commented-out code and unrelated formatting changes.

4. Make CI green before asking. Don't make reviewers point out failing tests.

5. Point reviewers to the tricky parts. Leave your own comment on lines where you made a judgement call.

When you get comments:

  • Reply to each one: fix it, or explain why not. Don't silently ignore comments.
  • Treat comments as being about the code, not about you. Ask questions when you disagree.
  • Push fixes as new commits during review so reviewers can see what changed.

Pull requests are also how you contribute to open source: how to make your first open source contribution.

Reviewers: what makes you approve a PR quickly? Share below.

1