Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-09-24 16:33:52 -04:00
parent 619f41f103
commit ea2cae1233
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

View File

@ -2,8 +2,10 @@
set -e
set -o pipefail
if [[ -z "$TOKEN" ]]; then
echo "Set the TOKEN env variable."
GITHUB_TOKEN=${GITHUB_TOKEN:-$TOKEN}
if [[ -z "$GITHUB_TOKEN" ]]; then
echo "Set the GITHUB_TOKEN env variable."
exit 1
fi
@ -15,7 +17,7 @@ fi
URI=https://api.github.com
API_VERSION=v3
API_HEADER="Accept: application/vnd.github.${API_VERSION}+json"
AUTH_HEADER="Authorization: token ${TOKEN}"
AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"
main(){
local files