Fixed Travis rate-limit issue with Github requests

Using credentials avoids rate-limiting based on Travis's IP address
pull/6697/head
Christopher Haster 2018-04-07 13:04:47 -05:00 committed by adbridge
parent b2ace0485b
commit 41050c13dd
1 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ matrix:
# update status if we succeeded, compare with master if possible
- |
CURR=$(grep -o '[0-9]\+ cycles' prof | awk '{sum += $1} END {print sum}')
PREV=$(curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
PREV=$(curl -u "$MBED_BOT" https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
| jq -re "select(.sha != \"$TRAVIS_COMMIT\")
| .statuses[] | select(.context == \"travis-ci/$NAME\").description
| capture(\"runtime is (?<runtime>[0-9]+)\").runtime" \
@ -193,7 +193,7 @@ matrix:
# update status if we succeeded, compare with master if possible
- |
CURR=$(tail -n1 sizes | awk '{print $1}')
PREV=$(curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
PREV=$(curl -u "$MBED_BOT" https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
| jq -re "select(.sha != \"$TRAVIS_COMMIT\")
| .statuses[] | select(.context == \"travis-ci/$NAME\").description
| capture(\"code size is (?<size>[0-9]+)\").size" \