Skip to content

[eslint-monster] [Code Quality] actions/setup/js: fix route/URL/core failure-control lint findings #46096

Description

@github-actions

Summary

A third remediation stream in actions/setup/js covers control-flow and request-construction correctness: interpolated github.request() routes, new URL(...) without guarding throws, and core.setFailed() call sites that do not immediately transfer control. Address these findings together where they share the same root cause of unsafe control or request construction.

Affected files

Representative files from the current lint run:

  • actions/setup/js/add_reaction.cjs
  • actions/setup/js/add_reaction_and_edit_comment.cjs
  • actions/setup/js/add_workflow_run_comment.cjs
  • actions/setup/js/artifact_client.cjs
  • actions/setup/js/check_team_member.cjs
  • actions/setup/js/generate_history_link.cjs
  • actions/setup/js/mcp_cli_bridge.cjs
  • actions/setup/js/mount_mcp_as_cli.cjs
  • actions/setup/js/route_slash_command.cjs
  • actions/setup/js/safe_output_handler_manager.cjs

Representative diagnostics

  • add_reaction.cjs:193:41 — avoid opaque interpolated route argument to github.request()
  • add_workflow_run_comment.cjs:444:47 — avoid concatenated dynamic route argument to github.request()
  • route_slash_command.cjs:180:30 — use typed placeholder route form instead of interpolated template literal
  • artifact_client.cjs:73:10 — wrap new URL(url) in try/catch
  • generate_history_link.cjs:61:15 — wrap new URL(${server}/search) in try/catch
  • check_team_member.cjs:39:3 — add immediate control transfer after core.setFailed()
  • safe_output_handler_manager.cjs:1644:7 — add immediate control transfer after core.setFailed()

Expected outcome

  • github.request() calls use typed static route strings with parameters instead of interpolated whole-route expressions
  • new URL(...) failures are handled explicitly in flagged call sites
  • core.setFailed() paths do not continue execution after failure
  • The affected files no longer trigger these route/URL/control-flow custom lint rules

Checklist

  • Replace interpolated or concatenated github.request() route strings with typed placeholder forms
  • Guard flagged new URL(...) constructions with try/catch
  • Add immediate control transfer after core.setFailed() in flagged paths
  • Keep changes scoped to actions/setup/js
  • Run npm run lint:setup-js

Source

Daily ESLint Monster remediation stream from workflow run 29538839244.

Generated by 🧹 ESLint Monster · 15.6 AIC · ⌖ 8.47 AIC · ⊞ 3.9K ·

  • expires on Jul 23, 2026, 2:22 PM UTC-08:00

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions