myarcane / easy-pr

A small node JS CLI script to add some fun to your PR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

easy-pr

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.

Template style

PR title

Description

[Optional]

Brief description of the purpose of the ticket or of the changes introduced in the PR.

TODO

[Optional]

  • Example TODO

giphy

Features

  • Add a random gif based on the command tag

Installation

hub

Fisrt you need to install hub : A command line tool that wraps git.

Homebrew

hub can be installed through Homebrew on macOS:

$ brew install hub
$ hub version
git version 1.7.6
hub version 2.2.3

Windows

hub can be installed through Scoop on Windows:

> scoop install hub

For further installation details check hub.

Environement variables

Giphy token

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"

Github token

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"

npm link

To be able to use it as a local npm package. Clone locally easy-pr repository and run npm link on it.

Usage

To open a PR

> easy-pr <yourtag>

It will open a PR with a random gif based on the tag input

Tags

cover:_ https://media.giphy.com/media/3oEduTtmloCo39hzIA/giphy.gif _

stack:_ Node.js,hub _

About

A small node JS CLI script to add some fun to your PR

License:MIT License


Languages

Language:JavaScript 100.0%