[ca] fix: correct JSDoc type annotation in parse_mcp_gateway_log.cjs#24033
[ca] fix: correct JSDoc type annotation in parse_mcp_gateway_log.cjs#24033
Conversation
…_gateway_log.cjs
The type annotation was using `{typeof core}` which caused TypeScript error TS2502
(self-referential type annotation). Fixed to use `{typeof import('@actions/core')}`
to match the pattern used in other files in the codebase.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hey One small thing to note:
If you'd like a coding agent to do a broader sweep, here's a ready-to-use prompt:
|
There was a problem hiding this comment.
Pull request overview
Fixes a TypeScript (TS2502) CI failure in parse_mcp_gateway_log.cjs by correcting a self-referential JSDoc type annotation for the GitHub Actions core module.
Changes:
- Update the JSDoc param type from
typeof coretotypeof import('@actions/core')forwriteStepSummaryWithTokenUsage. - Align the typing pattern with other scripts in
actions/setup/jsthat already usetypeof import('@actions/core').
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/0d495997-5624-4cd7-88dc-8842493f5f33 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in a352850. The |
The PR was merged during my session, deleting the branch — so I'm unable to push the fix (branch protection prevents recreating The TS2345 error is now present in - * @param {{totalInputTokens: number, ...byModel: Object}} summary
+ * @param {{totalInputTokens: number, ...byModel: Object} | null} summary
|
Summary
Fixes CI failure caused by TypeScript error TS2502 in
actions/setup/js/parse_mcp_gateway_log.cjs.CI Failure
The CI run #23885854872 was failing due to:
Fix
The JSDoc type annotation on line 144 used
{typeof core}which TypeScript couldn't resolve —coreis not a local variable in this file, causing a self-referential type error.Before:
After:
This matches the pattern used in other files in the codebase (e.g.,
generate_workflow_overview.cjs,generate_mcp_scripts_config.cjs).Validation
npx tsc --noEmitpasses with no errorsmake test-unitpasses (all Go unit tests)make recompilecompiles all 179 workflows successfullyparse_mcp_gateway_log.test.cjs72 tests ✓)