Skip to content

Commit 91034c2

Browse files
committed
Use proper WorkflowRunEvent type instead of any
1 parent 8d32355 commit 91034c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/github/context.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type {
66
PullRequestEvent,
77
PullRequestReviewEvent,
88
PullRequestReviewCommentEvent,
9+
WorkflowRunEvent,
910
} from "@octokit/webhooks-types";
1011
// Custom types for GitHub Actions events that aren't webhooks
1112
export type WorkflowDispatchEvent = {
@@ -89,7 +90,7 @@ export type ParsedGitHubContext = BaseContext & {
8990
// Context for automation events (workflow_dispatch, schedule, workflow_run)
9091
export type AutomationContext = BaseContext & {
9192
eventName: AutomationEventName;
92-
payload: WorkflowDispatchEvent | ScheduleEvent | any;
93+
payload: WorkflowDispatchEvent | ScheduleEvent | WorkflowRunEvent;
9394
};
9495

9596
// Union type for all contexts
@@ -189,7 +190,7 @@ export function parseGitHubContext(): GitHubContext {
189190
return {
190191
...commonFields,
191192
eventName: "workflow_run",
192-
payload: context.payload as unknown as any,
193+
payload: context.payload as unknown as WorkflowRunEvent,
193194
};
194195
}
195196
default:

0 commit comments

Comments
 (0)