Yes, Your Team Needs Pull Request Templates
Imagine, you’ve recently hired a new engineer to join your team. During their first weeks, they are pouring over your projects’ repositories and trying to make sense of the codebase when they consistently stumble onto this message:
Pull Request with the description: “No description provided.”
That’s not very indicative of what changes were made, or what the code does. Let’s go ahead and fix that by adding a Pull Request Template that will nudge your engineers to fill out some information before submitting a Pull Request.
What is a Pull Request template?
A pull request template is a file containing markdown text that is added to your pull request description when the pull request is created.
Essentially, the template is a bunch of text that developers don’t want to write each time they submit code. Having these templates reduces their cognitive load, thus speeding up the entire process.
How to create a Pull Request template
- Go to the root of your project directory and create a .github folder.
- Create a file and name it PULL_REQUEST_TEMPLATE.md (case doesn't matter, but the file needs to be named this exactly for GitHub to process it)
- Copy & paste this into PULL_REQUEST_TEMPLATE.md (this is one of Echobind's default templates)
Description of PR that completes the issue here...## Changes<name_of_repository>: - Description of changes## Screenshots (prefer animated gif)## Checklist- [ ] Requires migrations?- [ ] Requires dependency update?- [ ] Automated tests- [ ] Looks good on large screens- [ ] Looks good on mobileFixes #
4. Save the file, commit, and merge it
The next time a Pull Request is created a template will appear. ✨
Imagine that same new developer cruising through your project’s code, having enough context to gain a better understanding of your codebase, all because of a template.
Feel free to browse our current Pull Request templates that we use on our projects!