fix: use env vars for safe string handling in continue-agents workflow
The "Update Check Run" step was interpolating step outputs directly into JavaScript template literals, which breaks when the agent output contains backticks, template literal interpolation sequences, or other special characters that interfere with JS string parsing. This caused failures like "SyntaxError: Unexpected identifier 'mobile'" when the agent output contained multi-line text with certain keywords. Fix by passing outputs as environment variables and accessing them via process.env, which safely handles all string content without parsing issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e60003fd34
commit
fe1a35a33e
1 changed files with 9 additions and 4 deletions
13
.github/workflows/continue-agents.yml
vendored
13
.github/workflows/continue-agents.yml
vendored
|
|
@ -143,16 +143,21 @@ jobs:
|
|||
- name: Update Check Run
|
||||
if: always()
|
||||
uses: actions/github-script@v8
|
||||
env:
|
||||
AGENT_OUTPUT: ${{ steps.run.outputs.output }}
|
||||
AGENT_ERROR: ${{ steps.run.outputs.error }}
|
||||
AGENT_SUCCESS: ${{ steps.run.outputs.success }}
|
||||
CHECK_RUN_ID: ${{ steps.check.outputs.id }}
|
||||
with:
|
||||
script: |
|
||||
const success = '${{ steps.run.outputs.success }}' === 'true';
|
||||
const output = `${{ steps.run.outputs.output }}`;
|
||||
const error = `${{ steps.run.outputs.error }}`;
|
||||
const success = process.env.AGENT_SUCCESS === 'true';
|
||||
const output = process.env.AGENT_OUTPUT || '';
|
||||
const error = process.env.AGENT_ERROR || '';
|
||||
|
||||
await github.rest.checks.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
check_run_id: ${{ steps.check.outputs.id }},
|
||||
check_run_id: parseInt(process.env.CHECK_RUN_ID, 10),
|
||||
status: 'completed',
|
||||
conclusion: success ? 'success' : 'failure',
|
||||
completed_at: new Date().toISOString(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue