From 01f8e77251e7e2bc7fcf434a71e141d2d2d5166c Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Tue, 25 Nov 2025 14:04:31 -0800 Subject: [PATCH] fix: backport workflow fails with PR title has double quotes (#6934) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes issue when PR title or merge commit has double quotes (e.g., https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/19684310613/job/56385939600). ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6934-fix-backport-workflow-fails-with-PR-title-has-double-quotes-2b66d73d3650815992dadb6142676754) by [Unito](https://www.unito.io) --- .github/workflows/pr-backport.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-backport.yaml b/.github/workflows/pr-backport.yaml index 696873add..69607d6fb 100644 --- a/.github/workflows/pr-backport.yaml +++ b/.github/workflows/pr-backport.yaml @@ -236,8 +236,8 @@ jobs: PR_TITLE=$(echo "$PR_DATA" | jq -r '.title') MERGE_COMMIT=$(echo "$PR_DATA" | jq -r '.mergeCommit.oid') else - PR_TITLE="${{ github.event.pull_request.title }}" - MERGE_COMMIT="${{ github.event.pull_request.merge_commit_sha }}" + PR_TITLE=$(jq -r '.pull_request.title' "$GITHUB_EVENT_PATH") + MERGE_COMMIT=$(jq -r '.pull_request.merge_commit_sha' "$GITHUB_EVENT_PATH") fi for target in ${{ steps.filter-targets.outputs.pending-targets }}; do @@ -326,8 +326,8 @@ jobs: PR_TITLE=$(echo "$PR_DATA" | jq -r '.title') PR_AUTHOR=$(echo "$PR_DATA" | jq -r '.author.login') else - PR_TITLE="${{ github.event.pull_request.title }}" - PR_AUTHOR="${{ github.event.pull_request.user.login }}" + PR_TITLE=$(jq -r '.pull_request.title' "$GITHUB_EVENT_PATH") + PR_AUTHOR=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH") fi for backport in ${{ steps.backport.outputs.success }}; do @@ -364,9 +364,9 @@ jobs: PR_AUTHOR=$(echo "$PR_DATA" | jq -r '.author.login') MERGE_COMMIT=$(echo "$PR_DATA" | jq -r '.mergeCommit.oid') else - PR_NUMBER="${{ github.event.pull_request.number }}" - PR_AUTHOR="${{ github.event.pull_request.user.login }}" - MERGE_COMMIT="${{ github.event.pull_request.merge_commit_sha }}" + PR_NUMBER=$(jq -r '.pull_request.number' "$GITHUB_EVENT_PATH") + PR_AUTHOR=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH") + MERGE_COMMIT=$(jq -r '.pull_request.merge_commit_sha' "$GITHUB_EVENT_PATH") fi for failure in ${{ steps.backport.outputs.failed }}; do