Skip to content

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jul 1, 2025

Closes #311

Applied changes based on Issue #311.

I’ve replaced the remaining untyped any/Promise<any> usages in the core action code:

  • In src/github/event.ts, loadEventPayload now returns a Promise<Record<string, unknown>> instead of Promise<any>, and the JSON.parse result is cast to that type.
  • In src/github/action.ts, removed the as any cast on runs[0]; the Octokit typings provide the correct shape so we can just use runs[0].
  • In src/client/codex.ts, replaced the unsafe (error as any).timedOut cast with a typed interface (error as { timedOut?: boolean }).timedOut.

These changes eliminate untyped any and strengthen the promise return types. Let me know if you’d like to tighten up GitHub payload handling in getEventType (currently still any) or add more specific interfaces!

@github-actions github-actions bot mentioned this pull request Jul 1, 2025
@YiweiShen YiweiShen merged commit 00bdf89 into main Jul 1, 2025
@YiweiShen YiweiShen deleted the codez-chore-311-refactor-types-replace-untyped-any-with-unknown-or-specific-types-3025378479 branch July 1, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid untyped any

1 participant