Site URL moved out to config

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 9 years ago
parent c8ea3e6c31
commit d39b0c34d0
  1. 4
      BuildServer/lib/builder.js
  2. 2
      BuildServer/lib/commenter.js

@ -14,7 +14,7 @@ var notifyStatus = function (options, callback) {
repo: options.reponame,
sha: options.hash,
state: options.state,
target_url: "https://mbs.pos/status/" + options.owner + "/" + options.reponame + "/" + options.hash,
target_url: settings.siteRoot + "status/" + options.owner + "/" + options.reponame + "/" + options.hash,
description: ((options.description || "") + "").substr(0, 140)
}, function (err, result) {
if (err) {
@ -83,7 +83,7 @@ var build = function (options, callback) {
headers: {
'X-Laziness-level': 1000
},
text: ("Build status URL: https://mbs.pos/status/" + owner + "/" + reponame + "/" + rev + "\r\n\r\n") +
text: ("Build status URL: " + settings.siteRoot + "status/" + owner + "/" + reponame + "/" + rev + "\r\n\r\n") +
(err ? ("Error message: " + err + "\r\n\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);

@ -196,7 +196,7 @@ exports.commentOnPullRequest = function (options, callback) {
return checkPullRequest(options, function (err, successMessage) {
getStatusMessageFromRelease(options.app, options.headRepoOptions, function (err, successMessage) {
var message = err ? ("Was not built:\r\n\r\n" + err + "\r\n\r\nDO NOT MERGE!") : ("Build OK\r\n\r\n" + successMessage),
statusUrlMessage = "Build status URL: https://mbs.pos/status/" + options.headRepoOptions.owner + "/" + options.headRepoOptions.reponame + "/" + options.headRepoOptions.rev + "\r\n\r\n";
statusUrlMessage = "Build status URL: " + settings.siteRoot + "status/" + options.headRepoOptions.owner + "/" + options.headRepoOptions.reponame + "/" + options.headRepoOptions.rev + "\r\n\r\n";
return writeComment(options, message + "\r\n\r\n" + statusUrlMessage, callback);
});
});

Loading…
Cancel
Save