g review: check if 'gh' is authenticated already
Signed-off-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: I689348489f89d74b10782302d7bea57a845e36d4
This commit is contained in:
parent
eb5c86a4d3
commit
3859ca3119
1 changed files with 5 additions and 0 deletions
5
g
5
g
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue