A Pull Request that will make people smile
Tags: pullrequest, softwarecraftsmansh, bestpractices, codereview
Published: 2019-11-05 14:21:56

---
title: A Pull Request that will make people smile
published: true
date: 2017-05-31 15:33:48 UTC
tags: pull-request,software-craftsmansh,best-practices,code-review
canonical_url: 
---

![](https://cdn-images-1.medium.com/max/1024/1*kqGRUPF2xmedbs0uE9NKTw.png)

If you have been working in a software team using any type of [git workflow](https://www.atlassian.com/git/tutorials/comparing-workflows), I bet you are familiar with the concept of [Pull Requests](https://www.atlassian.com/git/tutorials/making-a-pull-request). This article does not intent to school you on the mechanics of creating it, but rather on the art of what constitutes a Pull Request that brings smiles to reviewers and collaborators alike.

#### The Title

Here is your opportunity to let the reviewer know what your Pull Request (PR) is all about. Do go beyond just including the issue number; try to reflect the main point of the pull request. Don’t assume the reviewer will know, just based on the issue number.

**Examples of Pull Request titles:**

- BOS-8869 Introduced Social Login with Facebook, Google and Twitter.
- MYAPP-0007 Fixed Crash bug when adding item to Calendar in iOS.
- API-1020 Introduced Coach Marks for Filtering.

#### The Description

Putting together a useful description will significantly help the reviewer understand your changes. Specially if you changed many files, or the change is not trivial. Take the time to craft a detailed description, since you are in the best position to justify your approach/the functionality it provides; after all, you wrote it.

The description field of the Pull Request typically supports some type of markup (i.e.: **MarkDown** ). Just like you would for a well crafted essay, do make use of all of the formatting you have at your disposal to express the ideas in a clear manner.

**Examples of Descriptions:**

- Added Sorting capabilities: sorting can be done by Category (ascending and descending), by Date Published (Newest and Oldest), and by Amount (Ascending and descending).
- Changed implementation of the GetClubDetails method to process the request asynchronously. The return type is now Task\<ClubDetail\> and the method name GetClubDetailsAsync to follow the convention.
- Modified the FilterOptionsService to sort options alphabetically.
- Used the new Location API deployed to Azure and had to change Proxy, Service and Data Transfer Object associated with the Location Screen.

**Bonus Points:** Calling out the acceptance criteria of the story, will make it apparent what your change is introducing. Also, call out functionality is **not** included, in the case where a functionality has been split in several stories.

#### The Screenshots

**_“A_**  **_picture is worth a thousand words”_** _._ This could not be more true when it comes to pull requests.

If the change involves any UI change, always include a representation of **before** and **after.** This saves the reviewer lots of time, and provides clear guidance of what to expect.

**Some tips when including screenshots:**

- Resize the image to manageable size. The intent is to provide context of what changed, not to fill the screen with larger than life images.
- Highlight areas of the UI that are expected to change. Specially if the UI is too busy, and the change cannot be spotted easily.
- When useful, insert the images into a Table, for the purpose of contrasting the images side to side.

In the end, these are all tips that assist the reviewer in understanding the context of your change, and thus making the review process something that brings a smile to one’s face.

#### Sample Pull Request

**Title:** FITNESS-1039 Add Health Club Class List screen with loading state and booking capabilities.

**Description:**

The new Class ListScreen provides a list of available classes for the **_selected_** Health Club.

- The user sees a loading state while the screen is loading the data from the web.
- The user has the ability to book an available class by tapping on the **_Book_**  button.
- The user can cancel/reserve a booking, by tapping on the **_Booked_** button, for an already booked class.
- Filtering is **not implemented.**

![](https://cdn-images-1.medium.com/max/1024/1*AxZhQvma0e63VW3-iAT2Ng.png)<figcaption>Screenshots providing a visual aid for the multiple states of the screen.</figcaption>