mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-09-22 23:52:00 +00:00
Auto merge of #4211 - flip1995:check_changelog, r=matthiaskrgr
Check for changelog entry in PR bodies cc #4031 but now on the auto and try branches. (https://github.com/rust-lang/rust-clippy/issues/3955#issuecomment-502230021) changelog: none
This commit is contained in:
commit
e2948153d0
1 changed files with 15 additions and 0 deletions
15
.travis.yml
15
.travis.yml
|
@ -17,6 +17,7 @@ branches:
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- RUST_BACKTRACE=1
|
- RUST_BACKTRACE=1
|
||||||
|
- secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- |
|
- |
|
||||||
|
@ -88,6 +89,20 @@ matrix:
|
||||||
- os: windows
|
- os: windows
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- |
|
||||||
|
if [ "$TRAVIS_BRANCH" == "auto" ] || [ "$TRAVIS_BRANCH" == "try" ]; then
|
||||||
|
pr=$(echo $TRAVIS_COMMIT_MESSAGE | grep -o "#[0-9]*" | head -1 | sed 's/^#//g')
|
||||||
|
output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$pr" | \
|
||||||
|
python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
|
||||||
|
grep "^changelog: " | \
|
||||||
|
sed "s/changelog: //g")
|
||||||
|
if [ -z "$output" ]; then
|
||||||
|
echo "ERROR: PR body must contain 'changelog: ...'"
|
||||||
|
exit 1
|
||||||
|
elif [ "$output" = "none" ]; then
|
||||||
|
echo "WARNING: changelog is 'none'"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
- |
|
- |
|
||||||
rm rust-toolchain
|
rm rust-toolchain
|
||||||
./setup-toolchain.sh
|
./setup-toolchain.sh
|
||||||
|
|
Loading…
Reference in a new issue