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,