diff --git a/.github/workflows/auto-fix-ci-inline.yml b/.github/workflows/auto-fix-ci-inline.yml index 913d86e8..503b35ce 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 465234ea..acc76695 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({