CLI utils for GitHub
brew install jq
brew install gnu-sed --with-default-names
brew install https://raw.githubusercontent.com/mavimo/git-helper-gh/master/git-helper-gh.rb
- Clone this repo
- Include
bindirectory in your path, or create symlinks:ln -s $(pwd)/bin/git-gh-pr /usr/local/bin/git-gh-prln -s $(pwd)/bin/git-gh-start /usr/local/bin/git-gh-start
- Create a new GitHub token with "repo" permissions at settings page
- Configure each project using:
git config --add gh.username YOURNAME(replaceYOURNAMEwith your GitHub username, eg.mavimo)git config --add gh.project PROJECT/NAME(replacePROJECT/NAMEwith GitHub project name, eg.:mavimo/git-helper-gh. PAY ATTENTION as it's case-sensitive!)git config --add gh.token GITHUB_TOKEN(replaceGITHUB_TOKENwith your GitHub token generated above)
- Use
git checkout BRANCHto switch to the branch you want to use as base (eg.develop) - Use
git gh-start ISSUE_IDto start to work on a new feature (replaceISSUE_IDwith the issue ID you are start to working) - After pushing the branch containing your desired changes, use
git gh-prto create a new pull request. A new tab in your browser will open with preconfigured PR label, author, title and content; you will only have to choose an assignee and add more information if needed.