Creating a pull request template in Github

There comes a time when your team needs to conform on pull requests to provide an adequate amount of information in a common format so that automated tools, QA testers, code reviewers can grok the important information when they need to.

Github makes this easy to do. We tried it and it’s worked really well for us in our main project.

To do this, create a file inside your .github directory called pull_request_template.md, this can also go in docs/pull_request_template.md.

What should you include in here?

If you’ve ever done a PR into big open source projects, they’ll have a template for submitting to the projects. A list of questions to fill out so that you provide all the information you need.

If you just need to express a title format and keep it on the top of everyone’s mind, you can do that with html comments inside the markdown.

<!-- this is a comment -->

This will appear when you make the pull request, but not show up in the PR body when the pull request is made.

Here’s a sample file similar to what we have.

pullrequesttemplate.md

<!--
# Did you remember to:

  - Give your PR a name your granny would understand

  - Include the Jira Ticket ID in the Pull Request title


e.g. 'JRA-666: Bugfix - Gates of hell re-frozen after brief downtime'
-->

Madole
Written by who lives and works in Sydney building 3D maps in the browser.