thedeployguy

PR Reviews Tips: 6 tips for better Pull Requests

April 19, 2020

Pull requests are a huge part of being a developer, weather you are just getting started in your career or you have 10 years experience you will be/should be reviewing PRs. I want to give 6 tips for for better PR reviews (in no particular order)

  1. Set some time aside everyday just for PRs reviews - Your team members work hard on their PRs and when you are a team you have a duty to review PRs, give feedback and approve or reject them. You and your team members are the gatekeepers of the codebase so it if very important you find the time to do reviews. I do reviews in the morning, this is mostly because most of my team is in the US aso there is often PRs ready to review in the morning. Bonus Tip: Do them at the exact same time everyday, that way it becomes a habit.

  2. Everybody should reviews PRs and more importantly nobody should be excluded from it - It doesn’t matter if this is your 1st month in the industry or this is your 25 year in the industry everybody should review PRs and have their PR reviewed. We do this on my team and I have learned so much about code and so much about how different people approach solutions.

  3. Avoid “Bike Shedding” comments in PRs by Automated as much checks as you can - Nobody likes arguing about spacing, line height or other IMO meaningless things so use tools to automate all of this, prettier for example is an opinionated Code formatter that means you no longer need to have formatting discussions. Use tools like Eslint to do basic code checks for unused variables, functions etc so you do not have to look for these things. Automate everything you can into the development or CI process so the developer can focus on what matters most.

  4. Come up with a PR template - We didn’t have a PR template for a long time and the PR descriptions would vary widely. A PR template can avoid this situation, no longer should you need to ask for testing instructions, design links or Jira tickets, instead make it apart of your new PR process.

  5. Always leave a comment - Your team work hard on PRs, often no comment approvals can leave developers wanting. Always leave a comment even if it is yeah looks good, great job or anything it really makes a difference.

  6. Approve the PR, if your most of your comments/concerns have been addressed - Don’t leave it or never reply to PR comments. I know this can be hard with timing but make an effort to approve the PR.

They were 6 tips for better Pull requests, if you have any more tips please reach out to me on twitter and let me know.


Personal Blog by Jason Lloyd.
I talk about programming, life, self-development and everything in-between.