From 52d531637749708613349327434279d6bc0963bc Mon Sep 17 00:00:00 2001 From: Kobi Hikri Date: Tue, 28 Jul 2026 19:05:45 +0300 Subject: [PATCH] chore: compare the PR title from env instead of interpolating it into the shell (#32675) --- .github/workflows/fail-pr-to-master.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fail-pr-to-master.yaml b/.github/workflows/fail-pr-to-master.yaml index 8ea9e0c01..c01f87aaa 100644 --- a/.github/workflows/fail-pr-to-master.yaml +++ b/.github/workflows/fail-pr-to-master.yaml @@ -10,8 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Fail PR to master + env: + PR_TITLE: ${{ github.event.pull_request.title }} run: | - if [[ "${{ github.event.pull_request.title }}" == "chore(dev): release"* ]]; then + if [[ "$PR_TITLE" == "chore(dev): release"* ]]; then echo "PR title starts with 'chore(dev): release', allowing PR" else echo "Pull requests to the master branch are not allowed, target dev branch"