- download gpr into
~/bin
- change org and repo in the script
chmod +x ~/bin/gpr
- edit
~/.zshrc
addingexport PATH="$HOME/bin:$PATH"
cd your-cloned-dir
thengpr
Last active
May 20, 2019 13:15
-
-
Save phstc/9ba444079f3a21d893d6e82823f73e6d to your computer and use it in GitHub Desktop.
Browse a GitHub pull request based on the branch name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
branch = `git branch`.split("\n").map(&:strip).find { |branch| branch.start_with?('*') }.delete('* ') | |
# TODO: get the organization and repo based on `git remote -v` | |
url = "https://github.com/org/repo/pull/#{branch}" | |
`open "#{url}"` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment