Because every pull request is unique, here is a small node JS CLI script to add some fun to your PR.
The script will create a nice PR template adding a random gif to it.
[Optional]
Brief description of the purpose of the ticket or of the changes introduced in the PR.
[Optional]
- Example TODO
- Add a random gif based on the command tag
Fisrt you need to install hub : A command line tool that wraps git.
hub
can be installed through Homebrew on macOS:
$ brew install hub
$ hub version
git version 1.7.6
hub version 2.2.3
hub
can be installed through Scoop on Windows:
> scoop install hub
For further installation details check hub.
easy-pr
requires a giphy api token to be able to fetch a giphy url based on the tag input. You can easily generate an api token on the giphy dev portal and you must add it as an environement variable.
> export GIPHY_API_KEY="MYGIPHYAPIKEY"
easy-pr
also requires an api github token. You need to generate a github token on your github account with the scope repo
and add it as an environement variable. Of course this token should always remain private and never been shared.
> export GITHUB_TOKEN="MYGITHUBTOKEN"
To be able to use it as a local npm package. Clone locally easy-pr
repository and run npm link
on it.
To open a PR
> easy-pr <yourtag>
It will open a PR with a random gif based on the tag input
cover:_ https://media.giphy.com/media/3oEduTtmloCo39hzIA/giphy.gif _
stack:_ Node.js,hub _