refactor: clean code

This commit is contained in:
Fu Diwei
2025-01-05 17:19:57 +08:00
parent dfc192cb68
commit e4c51aece4
18 changed files with 169 additions and 148 deletions

View File

@@ -152,14 +152,14 @@ export const initWorkflow = (options: InitWorkflowOptions = {}): WorkflowModel =
root.config = { trigger: WORKFLOW_TRIGGERS.MANUAL };
if (options.template === "standard") {
let temp = root;
temp.next = newNode(WorkflowNodeType.Apply, {});
let current = root;
current.next = newNode(WorkflowNodeType.Apply, {});
temp = temp.next;
temp.next = newNode(WorkflowNodeType.Deploy, {});
current = current.next;
current.next = newNode(WorkflowNodeType.Deploy, {});
temp = temp.next;
temp.next = newNode(WorkflowNodeType.Notify, {});
current = current.next;
current.next = newNode(WorkflowNodeType.Notify, {});
}
return {