mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ensure runtime side picks up default project workflow mode
This commit is contained in:
parent
81f200641b
commit
0f7d185a61
@ -421,7 +421,7 @@ Project.prototype.update = function (user, data) {
|
||||
}
|
||||
return when.settle(promises).then(function(res) {
|
||||
var gitSettings = getUserGitSettings(user) || {};
|
||||
var workflowMode = (gitSettings.workflow||{}).mode || "manual";
|
||||
var workflowMode = (gitSettings.workflow||{}).mode || settings.editorTheme.projects.workflow.mode;
|
||||
if (workflowMode === 'auto') {
|
||||
return project.stageFile(modifiedFiles.map(f => project.paths[f])).then(() => {
|
||||
return project.commit(user,{message:"Update "+modifiedFiles.join(", ")})
|
||||
|
@ -35,7 +35,7 @@ var projectsEnabled = false;
|
||||
var projectLogMessages = [];
|
||||
|
||||
var projectsDir;
|
||||
var activeProject
|
||||
var activeProject;
|
||||
|
||||
var globalGitUser = false;
|
||||
|
||||
@ -107,6 +107,10 @@ function init(_settings, _runtime) {
|
||||
} catch(err) {
|
||||
}
|
||||
} else {
|
||||
// Ensure there's a default workflow mode set
|
||||
settings.editorTheme.projects.workflow = {
|
||||
mode: (settings.editorTheme.projects.workflow || {}).mode || "manual"
|
||||
}
|
||||
globalGitUser = gitConfig.user;
|
||||
Projects.init(settings,runtime);
|
||||
sshTools.init(settings);
|
||||
@ -576,7 +580,7 @@ function saveFlows(flows, user) {
|
||||
}
|
||||
return util.writeFile(flowsFullPath, flowData, flowsFileBackup).then(() => {
|
||||
var gitSettings = getUserGitSettings(user) || {};
|
||||
var workflowMode = (gitSettings.workflow||{}).mode || "manual";
|
||||
var workflowMode = (gitSettings.workflow||{}).mode || settings.editorTheme.projects.workflow.mode;
|
||||
if (activeProject && workflowMode === 'auto') {
|
||||
return activeProject.stageFile([flowsFullPath, credentialsFile]).then(() => {
|
||||
return activeProject.commit(user,{message:"Update flow files"})
|
||||
|
Loading…
Reference in New Issue
Block a user