From 91034c2a0e26d8873533f84a2356c06e3e5e70a3 Mon Sep 17 00:00:00 2001 From: km-anthropic Date: Tue, 19 Aug 2025 13:56:33 -0700 Subject: [PATCH] Use proper WorkflowRunEvent type instead of any --- src/github/context.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/github/context.ts b/src/github/context.ts index ff0712b..3e25ada 100644 --- a/src/github/context.ts +++ b/src/github/context.ts @@ -6,6 +6,7 @@ import type { PullRequestEvent, PullRequestReviewEvent, PullRequestReviewCommentEvent, + WorkflowRunEvent, } from "@octokit/webhooks-types"; // Custom types for GitHub Actions events that aren't webhooks export type WorkflowDispatchEvent = { @@ -89,7 +90,7 @@ export type ParsedGitHubContext = BaseContext & { // Context for automation events (workflow_dispatch, schedule, workflow_run) export type AutomationContext = BaseContext & { eventName: AutomationEventName; - payload: WorkflowDispatchEvent | ScheduleEvent | any; + payload: WorkflowDispatchEvent | ScheduleEvent | WorkflowRunEvent; }; // Union type for all contexts @@ -189,7 +190,7 @@ export function parseGitHubContext(): GitHubContext { return { ...commonFields, eventName: "workflow_run", - payload: context.payload as unknown as any, + payload: context.payload as unknown as WorkflowRunEvent, }; } default: