g review: check if 'gh' is authenticated already

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I689348489f89d74b10782302d7bea57a845e36d4
This commit is contained in:
Miklos Vajna 2020-10-26 10:20:22 +01:00
parent eb5c86a4d3
commit 3859ca3119

5
g
View file

@ -16,6 +16,11 @@ if [ "$1" == "review" ]; then
exit 1
fi
if ! gh auth status &>/dev/null; then
echo "'gh' thinks you are not logged into any GitHub hosts. Run 'gh auth login' to authenticate."
exit 1
fi
# e.g. co-4-2
BRANCH=$(git symbolic-ref HEAD|sed 's|refs/heads/||')
# e.g. origin