ghpr: check if on an invalid-looking branch

This commit is contained in:
Rob Watson 2021-05-17 11:28:27 +02:00
parent fc4324aaa7
commit a8a5f31903
1 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,12 @@
export GH_NO_UPDATE_NOTIFIER=1 export GH_NO_UPDATE_NOTIFIER=1
currentbranch="$(git bn)"
if [ "$currentbranch" = "staging" ] || [ "$currentbranch" = "master" ]; then
echo "Are you sure? Currently on branch '$currentbranch'"
exit 1
fi
output=$(gh pr view -w 2>&1) output=$(gh pr view -w 2>&1)
exitcode=$? exitcode=$?