File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,13 @@ jobs:
2626 run : |
2727 body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR_NUMBER" | \
2828 python -c "import sys, json; print(json.load(sys.stdin)['body'])")
29- output=$(grep "^changelog:\s*\S" <<< "$body" | sed "s/changelog:\s*//g") || {
30- echo "ERROR: pull request message must contain 'changelog: ...'. Please add it."
29+ output=$(awk '/^changelog:\s*\S/ && !/changelog: \[.*\]: your change/' <<< "$body" | sed "s/changelog:\s*//g")
30+ if [ -z "$output" ]; then
31+ echo "ERROR: pull request message must contain 'changelog: ...' with your changelog. Please add it."
3132 exit 1
32- }
33- echo "changelog: $output"
33+ else
34+ echo "changelog: $output"
35+ fi
3436 env :
3537 PYTHONIOENCODING : ' utf-8'
3638 PR_NUMBER : ' ${{ github.event.number }}'
You can’t perform that action at this time.
0 commit comments