diff --git a/packages/cli/src/webhooks/waiting-webhooks.ts b/packages/cli/src/webhooks/waiting-webhooks.ts index 9529d04c04..3176bbdf2d 100644 --- a/packages/cli/src/webhooks/waiting-webhooks.ts +++ b/packages/cli/src/webhooks/waiting-webhooks.ts @@ -215,7 +215,7 @@ export class WaitingWebhooks implements IWebhookManager { workflowData as IWorkflowDb, workflowStartNode, executionMode, - undefined, + runExecutionData.pushRef, runExecutionData, execution.id, req, diff --git a/packages/cli/src/workflow-execute-additional-data.ts b/packages/cli/src/workflow-execute-additional-data.ts index 351cd6f059..476ebf492d 100644 --- a/packages/cli/src/workflow-execute-additional-data.ts +++ b/packages/cli/src/workflow-execute-additional-data.ts @@ -495,6 +495,11 @@ function hookFunctionsSave(): IWorkflowExecuteHooks { retryOf: this.retryOf, }); + // When going into the waiting state, store the pushRef in the execution-data + if (fullRunData.waitTill && isManualMode) { + fullExecutionData.data.pushRef = this.pushRef; + } + await updateExistingExecution({ executionId: this.executionId, workflowId: this.workflowData.id, diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index 57ec23b544..c993a4826c 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -2114,6 +2114,7 @@ export interface IRunExecutionData { waitingExecutionSource: IWaitingForExecutionSource | null; }; waitTill?: Date; + pushRef?: string; } export interface IRunData {