2021-07-27 07:46:44 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Open GitHub CI for the current branch
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
export GH_NO_UPDATE_NOTIFIER=1
|
|
|
|
|
|
|
|
ghoutput=$(gh pr checks)
|
2021-07-27 18:31:27 +00:00
|
|
|
if [ ! $? -eq 0 ]; then
|
2021-07-27 07:46:44 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
url=$(echo $ghoutput | grep -o 'https://.*?' | tr -d '?')
|
|
|
|
|
|
|
|
if [ $(uname -s) = "Linux" ]; then
|
|
|
|
progname="xdg-open"
|
|
|
|
else
|
|
|
|
progname="open" # macOS
|
|
|
|
fi
|
|
|
|
|
|
|
|
eval "$progname $url"
|