Writing Better PRs: Make Your Reviewers Happy
There are plenty of version control providers out there—GitHub, GitLab, Bitbucket, and many more. But honestly, the specific platform doesn’t matter for the point I’m about to make. No matter which provider you use, one thing remains the same across all PRs: the author wants their PR to be as polished and complete as possible to get it approved quickly.
We all put our best efforts into preparing a PR (because we know what happens if we don’t). But if you’re new to the industry, here are a few things you should always keep in mind when creating a PR:
1. A Clear and Descriptive Title
Make sure your PR title is informative and gives others a quick idea of what the change is about. Many teams also include the ticket number to link it back to their task management tool (e.g., JIRA, ClickUp, etc.).
2. A Well-Written Description
The PR description is just as important as the code itself. Include:
- A high-level summary of the change
- The approach you took to solve the problem
- Any design documents or references that provide additional context
This helps reviewers quickly understand what’s going on without having to dig through the code themselves.
3. Proper Testing
It goes without saying, but make sure you’ve added the appropriate unit and integration tests. A PR that includes well-written tests shows that you’re not just writing code but also ensuring it works as expected.
4. Make the Review Process Easy
Reviewers are usually juggling their own tasks, yet they take time to go through your PR. Help them out by making things as clear as possible. If your PR lacks details, it can lead to:
- Reviewers getting frustrated because they can’t understand the change
- A lot of unnecessary back and forth to clarify things
- Delays in merging the PR, which could impact deadlines
💡 A Simple Trick That Works Wonders
One thing that has always worked well for me is leaving comments on the PR to highlight assumptions, missing details, or anything else that might be relevant. Even if something is incomplete or not ideal, be upfront about it.
Why?
- It shows that you’ve put thought into the details and potential edge cases
- It encourages meaningful discussions with the reviewer
- Reviewers will appreciate your honesty and the extra context
I’ve been doing this for a long time now, and it has made my PRs much smoother to review. If you haven’t tried it yet, give it a shot!
Let me know if this helps—would love to hear how it works for you! 🚀
Member discussion