GREP for PR reference accepts references that are split over a line (#2072)

Fixes #2070
This commit is contained in:
Mark Bell 2021-03-29 00:01:37 +01:00 committed by GitHub
parent 4218ae18c0
commit dc8b0a4383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,6 @@ jobs:
- name: Grep CHANGES.md for PR number
if: contains(github.event.pull_request.labels.*.name, 'skip news') != true
run: |
grep -P "PR #${{ github.event.pull_request.number }}[^0-9]" CHANGES.md || \
grep -Pz "PR( |\n\s*)#${{ github.event.pull_request.number }}[^0-9]" CHANGES.md || \
(echo "Please add 'PR #${{ github.event.pull_request.number }}' change line to CHANGES.md" && \
exit 1)