Fixed a bug; emails moved to config

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 11 years ago
parent 33d2cd3c92
commit d70a05b24f
  1. 6
      BuildServer/lib/builder.js

@ -83,15 +83,15 @@ var build = function (options, callback) {
}, },
function (callback) { function (callback) {
mailSender.send({ mailSender.send({
from: 'Micro Build Server <test@example.com>', from: settings.smtp.sender,
to: '"Receiver Name" <test@example.com>', to: settings.smtp.receiver,
subject: (err ? "Build failed for " : "Successfully built ") + owner + "/" + reponame + "/" + branch, subject: (err ? "Build failed for " : "Successfully built ") + owner + "/" + reponame + "/" + branch,
headers: { headers: {
'X-Laziness-level': 1000 'X-Laziness-level': 1000
}, },
text: ("Build status URL: https://mbs.pos/status/" + owner + "/" + reponame + "/" + rev + "\r\n\r\n") + text: ("Build status URL: https://mbs.pos/status/" + owner + "/" + reponame + "/" + rev + "\r\n\r\n") +
(err ? ("Error message: " + err + "\r\n\r\n") : "") + (err ? ("Error message: " + err + "\r\n\r\n") : "") +
((!result.messages || !result.messages.$allMessages) ? JSON.stringify(result, null, 4) : result.messages.$allMessages.map(function (msg) { return msg.prefix + "\t" + msg.message; }).join("\r\n")) ((!result || !result.messages || !result.messages.$allMessages) ? JSON.stringify(result, null, 4) : result.messages.$allMessages.map(function (msg) { return msg.prefix + "\t" + msg.message; }).join("\r\n"))
}, callback); }, callback);
} }
], callback); ], callback);

Loading…
Cancel
Save