4 Ways to Review a Pull Request
Tags: 52postproject, github, productivity
Published: 2021-01-10 17:33:17

Generally, I review pull requests twice<sup>1</sup> a day. Once when I sit down to start the workday and after lunch. I do this because, as a coworker, I don't want to be a blocker for anyone. Also, it gets me back into the work groove when starting my day and coming back from lunch. Lastly, and my personal favorite, I can procrastinate a bit starting my work.

I do get excited to review others' work to see how they solved a problem;  I get to learn something new while I'm at it. Here are the top four things I'm doing and looking out for during a review.

### The "Just going to throw this out there..." Comment
We all have our own opinions on what the code should do and the correctness. We've all given a "nit" comment but, I want to make sure I'm giving _feedback_ and not telling others my way or the highway.

1. Always call out your nit
2. What you'd like to see updated
3. Why you want it updated

These are the softest of my comments during a review, very take it or leave it.

### Were you done with that?
I try to frame my comments as questions rather than direct statements. There could be a requirement I'm unaware of or some bug they were working around. Again, maybe I'll learn something. This could be one of those moments.

### Ok, now do it again
We all strive for 100% code coverage, and _most_ times that's a lofty goal that only sets you up for failure<sup>2</sup>. There are two things I expect with new code, anything else is just extra gold: were tests added, and are they more tests than we previously had. It's simple and one of the most effective ways to get people writing tests.

### What does this button do?
I am not, and no one should be, a coworker who takes work, tosses it to QA for review, and waits for feedback on bugs. We are a team, right?  The last thing I do is walk through the testing steps in the PR description, leave any weird finds I have in the review box. Something a la this:
![github pull review comment](https://docs.github.com/assets/images/help/pull_requests/review-summary-comment-window.png)
<figcaption>Image courtesy of Github</figcaption>

## ✨BONUS APPROVALS✨
Ok so, approvals to me are just as important as reviewing. I like to leave more than just the green check we all are waiting for. Sometimes it's an emoji, like this one :hotdog:, and other times it's a gif like this one:

![david schitts creek saying im obsessed](https://media.giphy.com/media/l0Ex6Ut39Zj7DzJn2/giphy.gif)
<figcaption>i will always celebrate a win for anyone #personalcheercaption</figcaption>

Those are always a favorite and I use gifs more than I'm willing to admit.

## What's your Process?
Here is my process and I hope you're able to take something from it. How do you review work? What do you find the most encouraging when receiving feedback? Let me know in the comments!

##### Footnotes
1. Anyone can message me and ask for a review. Twice a day, I have a dedicated time to look and check.
2. One day I'll write something about having tests that cover every single line only ends up meaning you miss more than you intended. It's a hot take, I know. That doesn't mean you shouldn't write tests, please, write your tests.