Last active
May 11, 2018 15:56
-
-
Save atsmith813/da088bf28e38e7c31c52d2ca5bda6321 to your computer and use it in GitHub Desktop.
Open pull request from the command line.
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
function open_pr() { | |
if [ $# -eq 1 ] | |
then | |
br=$(git rev-parse --abbrev-ref HEAD) | |
else | |
br=$2 | |
fi | |
open "https://github.com/$(git remote get-url origin | awk -F '[:.]' '{print $3}')/compare/$1...$br?expand=1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment