Fix pr linting fail when pasting issue url (#410)

This commit is contained in:
Elbaz 2023-09-18 13:08:13 +03:00 committed by GitHub
parent 9724c4d748
commit 4950f16756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_BODY=$(gh pr view ${{ github.event.pull_request.number }} --json body --jq ".body")
ISSUES=$(echo $PR_BODY | tr '[:upper:]' '[:lower:]' | sed -n -E '/(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|relates to|related to|part of) #[0-9]+/p')
ISSUES=$(echo $PR_BODY | tr '[:upper:]' '[:lower:]' | sed -n -E '\;((close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|relates to|related to|part of) (#|https://github.com/opentffoundation/opentf/issues/)[0-9]+);p')
if [ -z "$ISSUES" ]
then
gh pr comment ${{ github.event.pull_request.number }} -b "Please link the relevant issue that this PR handles using one of the following words