Easily add a template to every GitHub pull request. Customize it on CodePen - http://codepen.io/fabien-d/full/obMOOy/
The bookmarklet enforces a commit naming convention which allows it to easily link an attached story. Each commit to be linked to an issue must contain the issue not in the following syntax: #1234
There are two main configuration to define, a template and an issue tracking base url.
To edit the template, open index.js
and modify the markdown inside the getTemplate
method.
function getTemplate ( story ) {
let template =
`
{Insert template markdown here}
`;
return template;
}
Note: The template is using ES2015 (ES6) template strings and whitespace is NOT removed.
To edit the url, open index.js
and modify the issueUrl
variable.
const issueUrl = '';
First time:
- Clone the repo:
git clone git@github.com:fabien-d/github-pr-template-bookmarklet.git
- Install dependencies:
npm install
To build and install:
gulp
- Copy contents of
dist/index.min.js
- Create a new bookmarklet, give it a name and paste the content into the "URL" field
With a "new pull request" screen open, click the added bookmarklet and the description box will get prefilled with your given template.