A Rust command-line tool to generate a pull request by taking the leverage of GITHUT CLI and git commit logs on current branch, then create a draft Pull requests.
Inspirated by https://github.com/Mieraidihaimu/GeneratePR Swift command line tool
- Linux
- OSX
The intension of this command line tool is to automate some of the redundant manual processes. I have used swift-argument-parser and github-cli. It will:
- Get all the commit logs against the base branch
- Generate full pr description according to git commit logs and given optional extra description.
- Push the working branch to remote origin. At the moment,
gh pr createwill not push branch to the server cli/cli#1718. Thus, we need to manually push the working branch to origin - Create pull request by using
gh pr create - Optional, it will open the created pull request url on the default browser.
For now, need to be in Mac enviroment with git command line tool and github cli installed,
- Install git https://github.com/git-guides/install-git
- Install homebrew https://github.com/Homebrew/install
To install it, simply add the following lines Ready Set goal ~~~~~
git clone https://github.com/Mieraidihaimu/gen-pr.git
cd gen-pr
#This will build, export the executable binary `gen-pr` and install dependency package Github CLI
makeonce you have moved binary file as gen-pr, you can start creating PR like
gen-pr -t "title" -i "Mieraidihaimu/GeneratePR/issues/1" -e "no need to panic" --fix -othen you can sit back and relex. Here are the usage
SAGE:
gen-pr [FLAGS] [OPTIONS] --issue-link <issue-link> --title <title>
FLAGS:
-d, --debug
-f, --feature
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-b, --base-branch <base-branch> Set base branch [default: ]
-e, --extra-desciption <extra-description> Set extra description [default: ]
-i, --issue-link <issue-link> Set Pull request linked issue
-t, --title <title> Set Pull request title
To learn more please use --help or visit https://github.com/Mieraidihaimu/gen-pr
- Fork it! 👀
- Create your feature branch:
git checkout -b name/my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin name/my-new-feature - Submit a pull request :D 🙈
- Get thumbs up and 👍
- Email : mieraisan@gmail.com
GeneratePR is released under the MIT license. See LICENSE for details.