From d612bcefbb824f6082d789e80a18a6f9b082e257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Morcillo=20Mu=C3=B1oz?= Date: Tue, 22 Aug 2023 12:05:23 +0200 Subject: [PATCH] Add support for repository_dispatch event This adds support for repository_dispatch event in workflows. --- src/event.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/event.ts b/src/event.ts index 1bd89e7..33ac4b5 100644 --- a/src/event.ts +++ b/src/event.ts @@ -5,7 +5,8 @@ export type EventName = | "workflow_run" | "workflow_dispatch" | "schedule" - | "pull_request_target"; + | "pull_request_target" + | "repository_dispatch" export type EventOptions = T extends "push" ? PushEventOptions @@ -19,6 +20,8 @@ export type EventOptions = T extends "push" ? WorkflowDispatchEventOptions : T extends "schedule" ? ScheduleEventOptions + : T extends "repository_dispatch" + ? RepositoryDispatchEventOptions : never; interface PushEventOptions { @@ -56,6 +59,10 @@ interface WorkflowDispatchEventOptions { type ScheduleEventOptions = Array<{ cron: string }>; +interface RepositoryDispatchEventOptions { + types: string[] +} + export interface Event { name: EventName; options?: EventOptions;