From 0620679d11846dc1f96c7f05d14328abeee86f2e Mon Sep 17 00:00:00 2001 From: Joseph Turian Date: Tue, 18 Mar 2025 17:42:37 +0000 Subject: [PATCH] fix: Correct JavaScript syntax in GitHub Actions workflow (#7194) --- .github/workflows/openhands-resolver.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/openhands-resolver.yml b/.github/workflows/openhands-resolver.yml index 9820458ec3..d550fb802b 100644 --- a/.github/workflows/openhands-resolver.yml +++ b/.github/workflows/openhands-resolver.yml @@ -295,11 +295,12 @@ jobs: if: always() env: AGENT_RESPONDED: ${{ env.AGENT_RESPONDED || 'false' }} + ISSUE_NUMBER: ${{ env.ISSUE_NUMBER }} with: github-token: ${{ secrets.PAT_TOKEN || github.token }} script: | const fs = require('fs'); - const issueNumber = ${{ env.ISSUE_NUMBER }}; + const issueNumber = process.env.ISSUE_NUMBER; let logContent = ''; try { @@ -330,13 +331,15 @@ jobs: if: always() # Comment on issue even if the previous steps fail env: AGENT_RESPONDED: ${{ env.AGENT_RESPONDED || 'false' }} + ISSUE_NUMBER: ${{ env.ISSUE_NUMBER }} + RESOLUTION_SUCCESS: ${{ steps.check_result.outputs.RESOLUTION_SUCCESS }} with: github-token: ${{ secrets.PAT_TOKEN || github.token }} script: | const fs = require('fs'); const path = require('path'); - const issueNumber = ${{ env.ISSUE_NUMBER }}; - const success = ${{ steps.check_result.outputs.RESOLUTION_SUCCESS }}; + const issueNumber = process.env.ISSUE_NUMBER; + const success = process.env.RESOLUTION_SUCCESS === 'true'; let prNumber = ''; let branchName = ''; @@ -401,10 +404,12 @@ jobs: - name: Fallback Error Comment uses: actions/github-script@v7 if: ${{ env.AGENT_RESPONDED == 'false' }} # Only run if no conditions were met in previous steps + env: + ISSUE_NUMBER: ${{ env.ISSUE_NUMBER }} with: github-token: ${{ secrets.PAT_TOKEN || github.token }} script: | - const issueNumber = ${{ env.ISSUE_NUMBER }}; + const issueNumber = process.env.ISSUE_NUMBER; github.rest.issues.createComment({ issue_number: issueNumber,