From 3af17849bf96f014a79206c04fa51f6b81545bb6 Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:39:48 +0300 Subject: [PATCH] safely parse quoted titles [run_process_replay] (#5183) --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 53b6515ae9..80dcaef25a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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