grep only lines, that start with 'changelog: '

This commit is contained in:
flip1995 2019-06-18 12:14:02 +02:00
parent 61ca901e51
commit 1c87df486e
No known key found for this signature in database
GPG Key ID: 693086869D506637

View File

@ -94,7 +94,7 @@ script:
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: " | \
grep "^changelog: " | \
sed "s/changelog: //g")
if [ -z "$output" ]; then
echo "ERROR: PR body must contain 'changelog: ...'"