This content originally appeared on Go Make Things and was authored by Go Make Things
Yesterday, I wrote about how much I loved working with the team at Cloud Four on a recent project.
One of the things they do very well that most dev teams I’ve worked with do not is make full use of GitHub’s PR Templates feature.
In my consulting work, I see a lot of PRs that include either a one-line comment or not description at all.
But Cloud Four’s PRs always include a rich amount of detail that makes it much easier for the reviewer to understand what’s going on and what to look at. This encourages more robust PR reviews that actually catch issues ahead of time.
To make this easier for the person creating the PR, every new PR automatically loads with a pre-populated template in the description that includes things like…
- An overview of the PR
- Related future work to be done or dependency changes
- Screenshots or video recordings
- How to actually test the code
As a partner, it made stepping into an already-in-motion project so much easier because I had much of the context I needed readily available.
GitHub makes this easy for you by letting you define a PR template that automatically loads into the description. To do so…
- Create a
/.githubdirectory in the project (with leading dot –., these may be hidden by default on macOS). - In it, create a markdown file called
pull_request_template.md. - Add the content you want for your template to the file.
- Push it up to GitHub.
Here’s what the one I use for Kelp UI looks like…
Closes {LINK TO GH ISSUE}
## Description
A clear and concise description of the PR.
Use this section for review hints, explanations or discussion points/todos.
- Summary of changes
- Reasoning
- Additional context
How to contribute: https://kelpui.com/docs/getting-started/contributing/
## Screenshots
Screenshots or a screen recording of the visual changes associated with this PR.
(Feel free to delete this section for non-visual changes.)
## Docs
Add any notes that help to document the feature/changes. Doesn't need to be your best writing, just a few words and/or code snippets.
## Ready?
Did you do any of the following? If not, no worries, but if you can
it's really helpful.
- [ ] Documented what's new
- [ ] Added in-code documentation (wherever needed)
- [ ] Wrote tests for new components/features
- [ ] Ran the linter to ensure style guidelines were followed
- [ ] Created a demo
## Kelp Contributor License Agreement
I give Chris Ferdinandi and Go Make Things, LLC permission to license my contributions on any terms they like. I am giving them this license in order to make it possible for them to accept my contributions into their project.
**_As far as the law allows, my contributions come as is, without any warranty or condition, and I will not be liable to anyone for any damages related to this software or this license, under any kind of legal claim._**Feel free to copy, paste, and modify as desired for your project.
Like this? A Lean Web Club membership is the best way to support my work and help me create more free content.
This content originally appeared on Go Make Things and was authored by Go Make Things