Authenticate with github_api_token

This commit is contained in:
flip1995 2019-04-25 17:08:20 +02:00
parent a0f6c9361b
commit cb6cec5695
No known key found for this signature in database
GPG key ID: 693086869D506637

View file

@ -17,6 +17,7 @@ branches:
env:
global:
- RUST_BACKTRACE=1
- secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
install:
- |
@ -90,7 +91,7 @@ matrix:
script:
- |
if [ "$TRAVIS_BRANCH" == "auto" ] || [ "$TRAVIS_BRANCH" == "try" ]; then
output=$(curl -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$TRAVIS_PULL_REQUEST" | \
output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$TRAVIS_PULL_REQUEST" | \
python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
grep "changelog: " | \
sed "s/changelog: //g")