DEV Community

Cover image for How to Create a Good Pull Request Template (and Why You Should Add Gifs)
BekahHW for OpenSauced

Posted on Edited on

How to Create a Good Pull Request Template (and Why You Should Add Gifs)

I wasnโ€™t in tech when Pull Requests (PRs) were first introduced by GitHub back in 2008. And when I graduated from bootcamp four years ago, I had probably created only a handful of PRs. I quickly learned how vital PRs were when I started my first job on a team though. And my appreciation for a good Pull Request has only increased as I spend more time as a maintainer.

The great things about Pull Requests are that they allow for collaboration between contributors and maintainers, offer an opportunity to communicate changes that have been made and why they are important, and the ability for maintainers to provide feedback. Because contributors come from different backgrounds, have varying degrees of experience, and speak different languages, sometimes creating good PRs can be tricky. But there are some ways to optimize the experience for everyoneโ€“including adding gifs.

How to Create a Pull Request Template

Maintainers can help to improve the experience for both reviewing Pull Requests and for contributors submitting them by creating a template.

I like to think of Pull Request templates as a kind of contributor onboarding. It helps to guide them through the process of writing a good pull request and communicating with the maintainers. Although good templates may vary according to different organizations, their standards, and their needs, there are some basic checklists that you can use to generate your own.

To create a PR template in GitHub, create a .github folder in the root of your repository and a file called PULL_REQUEST_TEMPLATE.md.

At OpenSauced, we used foremโ€™s Pull Request template for inspiration for
our template.

gif of OpenSaucedโ€™s PR template

You can use markdown to create your template, and include sections like:

  • What type of PR is this?
  • Description of the changes
  • Related Tickets & Documents
  • Mobile & Desktop Screenshots/Recordings
  • Tests
  • Documentation
  • Post-deployment tasks
  • What gif best describes this PR or how it makes you feel?

Let Them Add Gifs!

That last one might seem out of place to you, but it can actually make the PR experience more fun, engaging, and effective. Here's why:

  • Gifs can bridge language gaps and help contributors express themselves more clearly.
  • Gifs can showcase contributors' personalities and add a personal touch to the PR.
  • Gifs can increase engagement and make the review process more enjoyable for everyone.

How to add Gifs to Your PR

If youโ€™re a contributor, you might be wondering, โ€œWhatโ€™s the easiest way to add a gif?โ€ I use the GIFs for GitHub chrome extension. Once itโ€™s installed, youโ€™ve got a quick way to add all your favorite gifs to enhance that PR experience. Just search for the gif you want, and click it. You can even add a caption to describe the gif or explain how it relates to the PR ๐Ÿ‘

adding a gif of leslie knope and april with the caption โ€œHow much fun is it working here!?

You can read more about PRs with @Brian Douglasโ€™ post on Tips for getting your Pull Request reviewed on GitHub. Or check out the hottest repos and how they handle PRs on OpenSauced hot repositories. And if you have tips for creating great pull requests, let us know in the comments below.

header image created using midjourney.

Top comments (34)

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
cicirello profile image
Vincent A. Cicirello •

Nice post. Might be worth mentioning where you explain how to create a template that if you put it in a repository named .github that it applies to all of the repositories that you own, and you only need to maintain it there.

Anyway, nice template. I've been considering making changes to mine and yours gave me some ideas.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
bekahhw profile image
BekahHW OpenSauced •

I thought of adding that, but then decided I could do a whole post on that.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
prakhartiwari0 profile image
Prakhar Tiwari •

Wow I didn't know that! Thanks

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
codergirl1991 profile image
Jessica Wilkins OpenSauced •

I love this PR template.

I definitely want to use this for my open source projects and want to suggest it for the teams I am on

Thank you for sharing.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
bekahhw profile image
BekahHW OpenSauced •

Thanks, Jessica! Not gonna lie, OpenSauced's PR template is my favorite. I looked at a lot of other ones, but this my favorite.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
0vortex profile image
TED Vortex (Teodor Eugen Duศ›ulescu) •

have a dream of upgrading those templates from checkboxes to selects but never get to it in real life :<

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
bekahhw profile image
BekahHW OpenSauced •

Why do you think selects will be better?

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
0vortex profile image
TED Vortex (Teodor Eugen Duศ›ulescu) •

Humans are biased to the scanning effect of the first page of content, that is currently taken up by the options of the "type of pull request" selector being spread as checkbox options; this makes it difficult for them to scan the other important sections of the pull request template (description, related tickets, docs, etc)

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini Thread
 
sinewalker profile image
Mike Lockhart • • Edited

I use labels instead, for better scanning, and also selecting PRs for review by type using the labels.

This does need pointing out to contributors, though. You can add HTML comments to PR templates for instructions or guidance.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
jesserweigel profile image
Jesse R Weigel •

That is an awesome cover photo! You could be an AI art prompt engineer!

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
bekahhw profile image
BekahHW OpenSauced •

Hahahah. Thanks for generating it for me.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
jesserweigel profile image
Jesse R Weigel •

You're welcome! Anytime!

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
sergeyleschev profile image
Sergey Leschev •

Adding gifs to the template can also bring more engagement and make the review process more enjoyable. It's good to see that OpenSauced is using forem's template for inspiration.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
umeya_kassim profile image
umeya kassim •

Nice content il consider adding it in my next personal project new repository.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
bekahhw profile image
BekahHW OpenSauced •

Awesome!

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
bestwebdevelopment profile image
ReactJS Development Company • • Edited

Great post, very informative and helpful for me as a Web developer beginner.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
bekahhw profile image
BekahHW OpenSauced •

Thanks for reading!

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
developerdoran profile image
Jake Doran •

Great article! One of the things I miss the most about GitHub (my team use BitBucket currently) is the ability to create PR templates they are super handy!

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
bekahhw profile image
BekahHW OpenSauced •

Yes! I love issue templates too.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
xanderrubio profile image
Alexander Clemens •

Thanks @bekahhw for sharing and adding this to my open source project no to come back to in the furute to enhance or pull request template.

๐Ÿ† Live Soccer TV: opensauced/how to create a good pull request template and why you should add gifs il - Pertandingan Hari Ini
 
oakamel profile image
Omar Kamel •

Gifs is a great idea ๐Ÿ’ก that i would like to suggest to my team, thanks ๐Ÿ™

Some comments may only be visible to logged-in visitors. Sign in to view all comments.