Skip to content

Commit

Permalink
Merge pull request #1040 from contentstack/feat/CS-41445
Browse files Browse the repository at this point in the history
Fix: Workflow import is breaking for branch enabled
  • Loading branch information
antonyagustine authored Sep 15, 2023
2 parents c8839c0 + 8bb0e57 commit 3975793
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ module.exports = class importWorkflows {
});

const updateWorkflow = this.stackAPIClient.workflow(workflow.uid);
Object.assign(updateWorkflow, { workflow_stages: newWorkflowStages, name: workflow.name });
Object.assign(updateWorkflow, {
name: workflow.name,
branches: workflow.branches,
workflow_stages: newWorkflowStages,
});
return updateWorkflow.update();
}
};
6 changes: 5 additions & 1 deletion packages/contentstack-import/src/import/modules/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ export default class ImportWorkflows extends BaseClass {
});

const updateWorkflow = this.stack.workflow(workflow.uid);
Object.assign(updateWorkflow, { workflow_stages: newWorkflowStages, name: workflow.name });
Object.assign(updateWorkflow, {
name: workflow.name,
branches: workflow.branches,
workflow_stages: newWorkflowStages,
});

return updateWorkflow.update();
}
Expand Down

0 comments on commit 3975793

Please sign in to comment.