mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix error on auto commit for no flow change
This commit is contained in:
parent
9f1deb0c36
commit
a480919ec3
@ -608,8 +608,15 @@ async function saveFlows(flows, user) {
|
|||||||
var workflowMode = (gitSettings.workflow||{}).mode || settings.editorTheme.projects.workflow.mode;
|
var workflowMode = (gitSettings.workflow||{}).mode || settings.editorTheme.projects.workflow.mode;
|
||||||
if (workflowMode === 'auto') {
|
if (workflowMode === 'auto') {
|
||||||
return activeProject.stageFile([flowsFullPath, credentialsFile]).then(() => {
|
return activeProject.stageFile([flowsFullPath, credentialsFile]).then(() => {
|
||||||
return activeProject.commit(user,{message:"Update flow files"})
|
return activeProject.status(user, false).then((result) => {
|
||||||
})
|
const items = Object.values(result.files || {});
|
||||||
|
// check if saved flow make modification to repository
|
||||||
|
if (items.findIndex((item) => (item.status === "M ")) < 0) {
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
return activeProject.commit(user,{message:"Update flow files"})
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user