CLI tool to automatically create pull request on Github
You can install it either using cURL
$ curl -L https://raw.githubusercontent.com/idnan/github-pr/master/installer.sh | sudo shOr by cloning and manually installing it
$ git clone https://github.com/idnan/github-pr.git
$ cd github-pr
$ sudo make install$ ghpr -t <title> [options]Below is the description of all the accepted options
-hSource branch from which pull request will be created (Default: current branch)-bTarget branch to which PR is to be opened (Default: master)-tTitle of the PR (Default: the last commit's title, as long as there is only one commit in the PR)-dDescription of the PR-cCopy the PR URL to the clipboard-fFake run, doesn't make the request but prints the URL and body
Pull request from current branch to
masterbranch with specified title
$ ghpr -t "Adds the unit tests"Pull request from
testsbranch todevelop
$ ghpr -t "Adds the unit tests" -h develop -b testsSpecifying the description
$ ghpr -t "Adds the unit tests" -h develop -b tests -d "Added unit tests for the ACL module"Copy the pull request URL to clipboard after opening Will open pull request from current branch to master with the given title and copy the URL to clipboard
$ ghpr -t "Adds the unit tests" -cDry run - Below command will not create a pull request but print the meta
$ ghpr -t "Adds the unit tests" -h develop -b testsYou need to have setup the access token on github
- Create token on Github
- Copy the generated token and run the following command
$ git config --global auth.token YOUR_ACCESS_TOKENMIT © Adnan Ahmed