From a5d5ff0f47e9821694e2e4c60d01adc6116c7ffc Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Fri, 27 Sep 2024 11:17:05 +1200 Subject: [PATCH] refactor: lift dispatch to main --- src/main.ts | 3 +++ src/return-dispatch.ts | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 15cb7d86..6161dbe7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,5 +10,8 @@ import { getWorkflowId, returnDispatch } from "./return-dispatch.ts"; const workflowId = await getWorkflowId(config); + // Dispatch the action + await api.dispatchWorkflow(config.distinctId); + await returnDispatch(config, startTime, workflowId); })(); diff --git a/src/return-dispatch.ts b/src/return-dispatch.ts index 8609ebb6..aa745471 100644 --- a/src/return-dispatch.ts +++ b/src/return-dispatch.ts @@ -122,9 +122,6 @@ export async function returnDispatch( workflowId: number, ): Promise { try { - // Dispatch the action - await api.dispatchWorkflow(config.distinctId); - // Attempt to get the branch from config ref core.info("Attempt to extract branch name from ref..."); const branch = getBranchName(config.ref);