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:
26
26
run : |
27
27
body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR_NUMBER" | \
28
28
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."
31
32
exit 1
32
- }
33
- echo "changelog: $output"
33
+ else
34
+ echo "changelog: $output"
35
+ fi
34
36
env :
35
37
PYTHONIOENCODING : ' utf-8'
36
38
PR_NUMBER : ' ${{ github.event.number }}'
You can’t perform that action at this time.
0 commit comments