- Generate a GitHub Access Token with
gitpr.pyin a scripts directory (I use
~/scripts/python/) and update it with your github access token.
/usr/bin/gitprand make it executable (
chmod +x /usr/bin/gitpr). Then update the value of
scripts_dirto the directory you saved
- Optional: Install pyperclip with
sudo pip install pyperclip. If pyperclip is detected, the link to the Pull Request on GitHub will be copied to your clipboard.
- Optional: if you are using a repository that takes Pull Requests at a branch other than master, you will have to add the repository to the
target_branchesdict with the repo as the key and the target branch as the value. See the code for an example.