safely parse quoted titles [run_process_replay] (#5183)

This commit is contained in:
qazal 2024-06-27 16:39:48 +03:00 committed by GitHub
parent 975b811ad9
commit 3af17849bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ jobs:
run: |
RAW_COMMIT_MESSAGE=$(git show -s --format=%B ${{ github.event.pull_request.head.sha }})
COMMIT_MESSAGE=$(printf '%q' "$RAW_COMMIT_MESSAGE")
RAW_PR_TITLE="${{ github.event.pull_request.title }}"
RAW_PR_TITLE=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH")
PR_TITLE=$(printf '%q' "$RAW_PR_TITLE")
if { echo "$COMMIT_MESSAGE" | grep -q "run_process_replay" || echo "$PR_TITLE" | grep -q "run_process_replay" || [ "${{ github.event.inputs.run_process_replay }}" = "true" ]; } && [ "$GITHUB_REF_NAME" != "master" ]; then