Scope
Remediate gh-aw-custom/require-json-parse-try-catch warnings under actions/setup/js.
Affected files
actions/setup/js/add_reaction_and_edit_comment.cjs
actions/setup/js/apply_safe_outputs_replay.cjs
actions/setup/js/artifact_client.cjs
actions/setup/js/build_checkout_manifest.cjs
actions/setup/js/convert_gateway_config_shared.cjs
actions/setup/js/generate_safe_outputs_tools.cjs
actions/setup/js/generate_workflow_overview.cjs
actions/setup/js/mcp_scripts_config_loader.cjs
actions/setup/js/patch_awf_chroot_config.cjs
actions/setup/js/route_slash_command.cjs
actions/setup/js/safe_outputs_handlers.cjs
actions/setup/js/safe_outputs_tools_loader.cjs
Representative diagnostics
add_reaction_and_edit_comment.cjs:143 — Wrap JSON.parse(commandsJSON) in try/catch.
convert_gateway_config_shared.cjs:82 — Wrap JSON.parse(process.env.GH_AW_MCP_CLI_SERVERS || "[]") in try/catch.
generate_safe_outputs_tools.cjs:98 — Wrap JSON.parse(fs.readFileSync(toolsSourcePath, "utf8")) in try/catch.
route_slash_command.cjs:641 — Wrap JSON.parse(process.env.GH_AW_SLASH_ROUTING || "{}") in try/catch.
safe_outputs_handlers.cjs:53 — Wrap JSON.parse(fs.readFileSync(filePath, "utf8")) in try/catch.
Expected outcome
All JSON.parse(...) operations in these setup runtime scripts should fail safely with explicit error handling, preserving actionable diagnostics instead of crashing the entrypoint.
Checklist
Generated by 🧹 ESLint Monster · 18.5 AIC · ⌖ 7.96 AIC · ⊞ 1.5K · ◷
Scope
Remediate
gh-aw-custom/require-json-parse-try-catchwarnings underactions/setup/js.Affected files
actions/setup/js/add_reaction_and_edit_comment.cjsactions/setup/js/apply_safe_outputs_replay.cjsactions/setup/js/artifact_client.cjsactions/setup/js/build_checkout_manifest.cjsactions/setup/js/convert_gateway_config_shared.cjsactions/setup/js/generate_safe_outputs_tools.cjsactions/setup/js/generate_workflow_overview.cjsactions/setup/js/mcp_scripts_config_loader.cjsactions/setup/js/patch_awf_chroot_config.cjsactions/setup/js/route_slash_command.cjsactions/setup/js/safe_outputs_handlers.cjsactions/setup/js/safe_outputs_tools_loader.cjsRepresentative diagnostics
add_reaction_and_edit_comment.cjs:143— WrapJSON.parse(commandsJSON)in try/catch.convert_gateway_config_shared.cjs:82— WrapJSON.parse(process.env.GH_AW_MCP_CLI_SERVERS || "[]")in try/catch.generate_safe_outputs_tools.cjs:98— WrapJSON.parse(fs.readFileSync(toolsSourcePath, "utf8"))in try/catch.route_slash_command.cjs:641— WrapJSON.parse(process.env.GH_AW_SLASH_ROUTING || "{}")in try/catch.safe_outputs_handlers.cjs:53— WrapJSON.parse(fs.readFileSync(filePath, "utf8"))in try/catch.Expected outcome
All
JSON.parse(...)operations in these setup runtime scripts should fail safely with explicit error handling, preserving actionable diagnostics instead of crashing the entrypoint.Checklist
try/catchwith context-rich error messages and safe fallbacks or explicit throws, matching surrounding script behavioractions/setup/jsnpm run lint:setup-js