mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 03:38:29 +00:00
Check PRs for changelog entry in the body
This commit is contained in:
parent
a73bb33399
commit
a0f6c9361b
13
.travis.yml
13
.travis.yml
@ -88,6 +88,19 @@ matrix:
|
|||||||
- os: windows
|
- os: windows
|
||||||
|
|
||||||
script:
|
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" | \
|
||||||
|
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 New Issue
Block a user