Skip to content

Commit

Permalink
grep only lines, that start with 'changelog: '
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Jul 15, 2019
1 parent 61ca901 commit 1c87df4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...'"
Expand Down

0 comments on commit 1c87df4

Please sign in to comment.