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

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

Loading…
Cancel
Save