FosterCommerce / pr-templates

Starter pull request templates we use for internal projects. Feel free to fork and adapt.

Home Page:https://fostercommerce.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Foster Commerce Pull Request Templates

Starter pull request templates we use for internal projects. Feel free to fork and adapt.

Why?

Merging changes through pull requests helps us with accountability, documentation, and code reviews. But it's hard to remember everything that goes into a PR, and to remember the steps to take when deploying to staging or production.

See

How to use

We currently use two templates:

  1. The base PR template will always show up. It includes a link to the deploy template, a place to document what the PR does, a place for extra notes, and some resource links.
  2. The deploy PR template is accessed through a custom link (see below). It includes a place to note all the previous PRs it includes, as well as a checklist for deploying to production.

Add to your project

Per GitHub, you can put your templates in a hidden .github directory, or in a docs directory. You could just download and copy over the .github directory from this repo.

Customize deploy link for your repo

The base PR template

The deploy repository link automatically:

  • creates a pull request to merge your staging branch into your production branch
  • Titles it DEPLOY YYYY-MM-DD (you still have to replace the date)
  • Labels it DEPLOY

Replace the variables in this URL (it's using JS syntax, so get rid of the concatenation symbols too) and then add it to your base PR template.

'https://github.com/' + UserName + '/' + repoName + '/compare/' + prodBranch + '...' + stagingBranch + '?title=DEPLOY+YYYY-MM-DD&labels=DEPLOY&template=deploy.md'

Customize the rest

You may also want to change some of the checklist steps, or ask for different information. Go to town!

ACTIVATE 🤖

Commit and merge the files into your default branch, whatever it is. Try making a PR and see what happens!

About

Starter pull request templates we use for internal projects. Feel free to fork and adapt.

https://fostercommerce.com

License:MIT License