From d48897c1f89e686444652a5f840654c68b014dac Mon Sep 17 00:00:00 2001 From: km-anthropic Date: Tue, 19 Aug 2025 14:47:27 -0700 Subject: [PATCH] Fix GitHub Actions syntax error - replace optional chaining with conditional --- .github/workflows/auto-fix-ci-inline.yml | 2 +- .github/workflows/auto-fix-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-fix-ci-inline.yml b/.github/workflows/auto-fix-ci-inline.yml index 913d86e..503b35c 100644 --- a/.github/workflows/auto-fix-ci-inline.yml +++ b/.github/workflows/auto-fix-ci-inline.yml @@ -163,7 +163,7 @@ jobs: const baseBranch = '${{ github.event.workflow_run.head_branch }}'; const prUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/compare/${baseBranch}...${branchName}?quick_pull=1`; - const issueNumber = ${{ github.event.workflow_run.pull_requests[0]?.number || 'null' }}; + const issueNumber = ${{ github.event.workflow_run.pull_requests[0] && github.event.workflow_run.pull_requests[0].number || 'null' }}; if (issueNumber) { await github.rest.issues.createComment({ diff --git a/.github/workflows/auto-fix-ci.yml b/.github/workflows/auto-fix-ci.yml index 465234e..acc7669 100644 --- a/.github/workflows/auto-fix-ci.yml +++ b/.github/workflows/auto-fix-ci.yml @@ -105,7 +105,7 @@ jobs: const baseBranch = '${{ github.event.workflow_run.head_branch }}'; const prUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/compare/${baseBranch}...${branchName}?quick_pull=1`; - const issueNumber = ${{ github.event.workflow_run.pull_requests[0]?.number || 'null' }}; + const issueNumber = ${{ github.event.workflow_run.pull_requests[0] && github.event.workflow_run.pull_requests[0].number || 'null' }}; if (issueNumber) { await github.rest.issues.createComment({