From bbff5e29d8ae8d02314292eae7b57992471fba6b Mon Sep 17 00:00:00 2001 From: tequ Date: Thu, 27 Nov 2025 08:36:02 +0900 Subject: [PATCH] Enhance GitHub Actions workflow by escaping "double quotes in PR title" (#640) --- .github/workflows/xahau-ga-nix.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/xahau-ga-nix.yml b/.github/workflows/xahau-ga-nix.yml index 3b04ef01f..b62220d15 100644 --- a/.github/workflows/xahau-ga-nix.yml +++ b/.github/workflows/xahau-ga-nix.yml @@ -19,6 +19,14 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: + - name: escape double quotes + id: escape + shell: bash + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: | + ESCAPED_PR_TITLE="${PR_TITLE//\"/\\\"}" + echo "title=${ESCAPED_PR_TITLE}" >> "$GITHUB_OUTPUT" - name: Generate build matrix id: set-matrix shell: python @@ -102,7 +110,7 @@ jobs: ref = "${{ github.ref }}" base_ref = "${{ github.base_ref }}" # For PRs, this is the target branch event_name = "${{ github.event_name }}" - pr_title = """${{ github.event.pull_request.title }}""" + pr_title = """${{ steps.escape.outputs.title }}""" pr_head_sha = "${{ github.event.pull_request.head.sha }}" # Get commit message - for PRs, fetch via API since head_commit.message is empty