Skip to content

[eslint-monster] setup/js: replace unsafe caught-error stringification and interpolation #49213

Description

@github-actions

Summary

Daily npm run lint:setup-js found a large cluster of error-message hygiene warnings in actions/setup/js: caught errors are being rendered with String(err), direct template interpolation like ${err}, or err.stack ? err.stack : String(err) instead of the shared sanitizing helper.

Root cause group

Use the existing getErrorMessage(...) helper consistently when formatting caught exceptions in actions/setup/js.

Affected files

  • actions/setup/js/apply_safe_outputs_replay.cjs
  • actions/setup/js/apply_samples.cjs
  • actions/setup/js/artifact_client.cjs
  • actions/setup/js/build_checkout_manifest.cjs
  • actions/setup/js/check_workflow_recompile_needed.cjs
  • actions/setup/js/convert_gateway_config_shared.cjs
  • actions/setup/js/copilot_harness.cjs
  • actions/setup/js/copilot_sdk_driver.cjs
  • actions/setup/js/create_code_scanning_alert.cjs
  • actions/setup/js/create_issue.cjs
  • actions/setup/js/create_pull_request.cjs
  • actions/setup/js/frontmatter_hash_pure.cjs
  • actions/setup/js/generate_aw_info.cjs
  • actions/setup/js/generate_git_bundle.cjs
  • actions/setup/js/generate_git_patch.cjs
  • actions/setup/js/generate_safe_outputs_tools.cjs
  • actions/setup/js/github_rate_limit_logger.cjs
  • actions/setup/js/handle_agent_failure.cjs
  • actions/setup/js/handle_detection_runs.cjs
  • actions/setup/js/handle_noop_message.cjs
  • actions/setup/js/install_frontmatter_skills.cjs
  • actions/setup/js/load_experiment_state_from_repo.cjs
  • actions/setup/js/mcp_scripts_config_loader.cjs
  • actions/setup/js/merge_remote_agent_github_folder.cjs
  • actions/setup/js/messages_core.cjs
  • actions/setup/js/mount_mcp_as_cli.cjs
  • actions/setup/js/parse_mcp_gateway_log.cjs
  • actions/setup/js/parse_mcp_scripts_logs.cjs
  • actions/setup/js/parse_token_usage.cjs
  • actions/setup/js/patch_awf_chroot_config.cjs
  • actions/setup/js/pi_agent_core_driver.cjs
  • actions/setup/js/pick_experiment.cjs
  • actions/setup/js/push_to_pull_request_branch.cjs
  • actions/setup/js/route_slash_command.cjs
  • actions/setup/js/run_evals.cjs
  • actions/setup/js/runtime_import.cjs
  • actions/setup/js/safe_outputs_config.cjs
  • actions/setup/js/safe_outputs_handlers.cjs
  • actions/setup/js/safe_outputs_tools_loader.cjs
  • actions/setup/js/setup_comment_memory_files.cjs
  • actions/setup/js/setup_threat_detection.cjs
  • actions/setup/js/start_mcp_gateway.cjs
  • actions/setup/js/upload_artifact.cjs

Representative diagnostics

  • actions/setup/js/apply_safe_outputs_replay.cjs:76gh-aw-custom/prefer-get-error-message-over-string
  • actions/setup/js/copilot_harness.cjs:859gh-aw-custom/no-caught-error-interpolation
  • actions/setup/js/copilot_sdk_driver.cjs:148gh-aw-custom/no-err-stack-then-string-fallback
  • actions/setup/js/create_issue.cjs:1192gh-aw-custom/no-err-stack-then-string-fallback
  • actions/setup/js/route_slash_command.cjs:41gh-aw-custom/prefer-get-error-message-over-string
  • actions/setup/js/start_mcp_gateway.cjs:380gh-aw-custom/prefer-get-error-message-over-string

Expected outcome

Replace unsafe or noisy caught-error formatting with getErrorMessage(...) where available, keeping behavior the same except for cleaner and more consistent error text.

Checklist

  • Fix only the caught-error formatting findings in the files above
  • Prefer getErrorMessage(err) over String(err), ${err}, or err.stack fallback patterns
  • Keep edits scoped to actions/setup/js
  • Run npm run lint:setup-js

Generated by 🧹 ESLint Monster · gpt54 · 15.8 AIC · ⌖ 6.66 AIC · ⊞ 4.8K ·

  • expires on Aug 6, 2026, 2:21 PM UTC-08:00

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions