Skip to content

Commit

Permalink
fix updating workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanKiral committed Nov 20, 2024
1 parent 11f2c2a commit 8be3260
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/modules/sync/sync/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ export const syncWorkflows = async (
logInfo(logOptions, "standard", "Updating workflows");

await serially(
[...operations.updated.keys()].map(codename => () =>
modifyWorkflow(
[...operations.updated.entries()].filter(([, arr]) => arr.length).map(([key]) => key).map(codename => () => {
const sourceWorkflow = operations.sourceWorkflows.find(w => w.codename === codename)
?? throwError(`Workflow { codename: ${codename} } not found.`);

return modifyWorkflow(
client,
codename,
operations.sourceWorkflows.find(w => w.codename === codename)
?? throwError(`Workflow { codename: ${codename} } not found.`),
)
),
sourceWorkflow,
);
}),
);
} else {
logInfo(logOptions, "standard", "No workflows to update");
Expand Down

0 comments on commit 8be3260

Please sign in to comment.