From 411f9b7542e060236adca90cc96ee3c4d5bc7573 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sat, 9 Mar 2019 10:53:55 +1100 Subject: [PATCH] use token to create more api requests --- .travis/after_success.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis/after_success.sh b/.travis/after_success.sh index a8e60792e..db75d7fb5 100644 --- a/.travis/after_success.sh +++ b/.travis/after_success.sh @@ -8,11 +8,9 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then GREP_PATH=ggrep fi -which curl -curl https://api.github.com/repos/olive-editor/olive/commits/master - # Get current repo commit from GitHub (problems arose from trying to pipe cURL directly into grep, so we buffer it through a file) -curl -s -N https://api.github.com/repos/olive-editor/olive/commits/master -o repo.txt +curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/olive-editor/olive/commits/master +curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/olive-editor/olive/commits/master -o repo.txt REMOTE=$($GREP_PATH -Po '(?<=: \")(([a-z0-9])\w+)(?=\")' -m 1 repo.txt) LOCAL=$(git rev-parse HEAD)