Improved pull request comments

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 9 years ago
parent d36a61a0de
commit 88a80ccdaf
  1. 13
      BuildServer/lib/commenter.js
  2. 13
      BuildServer/package.json

@ -1,6 +1,7 @@
"use strict";
var fs = require('fs'),
_ = require('underscore'),
builder = require('../lib/builder'),
settings = require('../settings');
@ -176,11 +177,15 @@ var getStatusMessageFromRelease = function (app, options, callback) {
if (report.result === "MBSNotFound") {
return callback("mbs.json is not found");
}
if (report.err) {
return callback("ERR: " + report.err);
if ((report.result.errors.$allMessages || []).length + (report.result.warns.$allMessages || []).length > 0) {
return callback(_.map(
report.result.errors.$allMessages || [], function(message) { return "ERR: " + message.message }
).concat(_.map(
report.result.warns.$allMessages || [], function(message) { return "WARN: " + message.message }
)).join("\r\n"));
}
if ((report.result.warns.$allMessages || []).length > 0) {
return callback("WARN: " + report.result.warns.$allMessages[0].message);
if (report.err) {
return callback("CRITICAL ERROR: " + report.err);
}
if ((report.result.infos.$allMessages || []).length > 0) {
return callback(undefined, report.result.infos.$allMessages[report.result.infos.$allMessages.length-1].message);

@ -6,16 +6,17 @@
"start": "forever -c node app.js"
},
"dependencies": {
"express": "3.4.4",
"jade": "*",
"adm-zip": "~0.4.4",
"async": "~0.2.9",
"express": "3.4.4",
"fs-extra": "~0.12.0",
"nodegit": "~0.1.4",
"github": "~0.2.2",
"glob": "~3.2.7",
"nodemailer": "~0.6.0",
"jade": "*",
"mustache": "~0.8.1",
"adm-zip": "~0.4.4",
"recursive-tree-copy": "0.0.1"
"nodegit": "~0.1.4",
"nodemailer": "~0.6.0",
"recursive-tree-copy": "0.0.1",
"underscore": "^1.8.3"
}
}

Loading…
Cancel
Save