現在作業しているブランチのPRが既に作られている場合、そのPRをブラウザで開く関数です。
依存
-
hub
コマンド -
open
コマンド
function pr-open {
local url=$(hub pr list -h $(git symbolic-ref --short HEAD) -f "%U")
if [ -z "$url" ]; then
echo "The PR based this branch not found."
return 1
fi
open $url
}