Skip to content

Commit

Permalink
fix(core): Make push work for waiting webhooks (#11678)
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy authored Nov 11, 2024
1 parent cbdd535 commit 600479b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/webhooks/waiting-webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class WaitingWebhooks implements IWebhookManager {
workflowData as IWorkflowDb,
workflowStartNode,
executionMode,
undefined,
runExecutionData.pushRef,
runExecutionData,
execution.id,
req,
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/src/workflow-execute-additional-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions packages/workflow/src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,7 @@ export interface IRunExecutionData {
waitingExecutionSource: IWaitingForExecutionSource | null;
};
waitTill?: Date;
pushRef?: string;
}

export interface IRunData {
Expand Down

0 comments on commit 600479b

Please sign in to comment.