Merge commit '98e2b9f25b' into clippyup
This commit is contained in:
commit
9482caf29f
186 changed files with 4668 additions and 1570 deletions
|
|
@ -3,7 +3,9 @@ Thank you for making Clippy better!
|
|||
We're collecting our changelog from pull request descriptions.
|
||||
If your PR only includes internal changes, you can just write
|
||||
`changelog: none`. Otherwise, please write a short comment
|
||||
explaining your change.
|
||||
explaining your change. Also, it's helpful for us that
|
||||
the lint name is put into brackets `[]` and backticks `` ` ` ``,
|
||||
e.g. ``[`lint_name`]``.
|
||||
|
||||
If your PR fixes an issue, you can add "fixes #issue_number" into this
|
||||
PR description. This way the issue will be automatically closed when
|
||||
|
|
@ -29,4 +31,5 @@ Delete this line and everything above before opening your PR.
|
|||
---
|
||||
|
||||
*Please write a short comment explaining your change (or "none" for internal only changes)*
|
||||
|
||||
changelog:
|
||||
|
|
|
|||
|
|
@ -34,15 +34,16 @@ jobs:
|
|||
run: |
|
||||
MESSAGE=$(git log --format=%B -n 1)
|
||||
PR=$(echo "$MESSAGE" | grep -o "#[0-9]*" | head -1 | sed -e 's/^#//')
|
||||
output=$(curl -H "Authorization: token ${{ secrets.GITHUB_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
|
||||
body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \
|
||||
python -c "import sys, json; print(json.load(sys.stdin)['body'])")
|
||||
output=$(grep "^changelog:\s*\S" <<< "$body" | sed "s/changelog:\s*//g") || {
|
||||
echo "ERROR: PR body must contain 'changelog: ...'"
|
||||
exit 1
|
||||
elif [[ "$output" = "none" ]]; then
|
||||
}
|
||||
if [[ "$output" = "none" ]]; then
|
||||
echo "WARNING: changelog is 'none'"
|
||||
else
|
||||
echo "changelog: $output"
|
||||
fi
|
||||
env:
|
||||
PYTHONIOENCODING: 'utf-8'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue