Skip to content

[eslint-monster] setup/js lint stream 3: standardize failure signaling and unsafe coercion patterns #47413

Description

@github-actions

Summary

Daily npm run lint:setup-js found a third stream in actions/setup/js around failure signaling and unsafe helper patterns: core.error() paired with process exits, missing control transfer after core.setFailed(), isNaN() coercion, and interpolated exec command strings.

Root cause group

Inconsistent action error-handling and command construction patterns that make failures harder to reason about or can silently mis-handle inputs.

Affected files

  • actions/setup/js/convert_gateway_config_copilot.cjs
  • actions/setup/js/start_mcp_gateway.cjs
  • actions/setup/js/mcp_cli_bridge.cjs
  • actions/setup/js/lock-issue.cjs
  • actions/setup/js/log_parser_bootstrap.cjs
  • actions/setup/js/push_experiment_state.cjs
  • actions/setup/js/expired_entity_cleanup_helpers.cjs
  • actions/setup/js/mark_pull_request_as_ready_for_review.cjs
  • actions/setup/js/parse_claude_log.cjs
  • actions/setup/js/pr_helpers.cjs
  • actions/setup/js/reply_to_pr_review_comment.cjs
  • actions/setup/js/templatable.cjs
  • actions/setup/js/temporary_id.cjs
  • actions/setup/js/create_pull_request.cjs
  • actions/setup/js/push_to_pull_request_branch.cjs

Representative diagnostics

  • convert_gateway_config_copilot.cjs:71:5Prefer core.setFailed(msg) over core.error() + process.exit(nonzero)
  • start_mcp_gateway.cjs:236:7Avoid core.error() followed by process.exit(nonzero)
  • mcp_cli_bridge.cjs:1264:5Avoid core.error() followed by process.exitCode = nonzero
  • lock-issue.cjs:78:5core.setFailed() does not stop execution — add return/throw/... immediately after
  • expired_entity_cleanup_helpers.cjs:35:11Prefer Number.isNaN(...) over global isNaN(...)
  • create_pull_request.cjs:662:19Avoid passing an interpolated template literal as the exec command
  • push_to_pull_request_branch.cjs:953:23Avoid passing an interpolated template literal as the exec command

Expected outcome

Normalize failure signaling to core.setFailed() plus explicit control transfer where needed, replace coercive isNaN() checks with Number.isNaN(), and convert interpolated exec commands to static command names plus argument arrays.

Checklist

  • Replace core.error() + process exit patterns with core.setFailed() where the rule requires it
  • Add explicit control transfer after core.setFailed() calls
  • Replace global isNaN() with Number.isNaN()
  • Replace interpolated exec command strings with static commands and args arrays
  • Run npm run lint:setup-js
  • Confirm this remediation stream is clean

Generated by 🧹 ESLint Monster · gpt54 25.8 AIC · ⌖ 8 AIC · ⊞ 4K ·

  • expires on Jul 29, 2026, 2:20 PM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions