mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Get PR number from bors commit message
This commit is contained in:
parent
cb6cec5695
commit
61ca901e51
@ -91,7 +91,8 @@ matrix:
|
||||
script:
|
||||
- |
|
||||
if [ "$TRAVIS_BRANCH" == "auto" ] || [ "$TRAVIS_BRANCH" == "try" ]; then
|
||||
output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$TRAVIS_PULL_REQUEST" | \
|
||||
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")
|
||||
|
Loading…
Reference in New Issue
Block a user