t-comm
Version:
专业、稳定、纯粹的工具库
49 lines (44 loc) • 1.38 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var wecomRobot_batchSend = require('../wecom-robot/batch-send.js');
var eslintParser_parse = require('./parse.js');
var eslintParser_robotMsg = require('./robot-msg.js');
require('../tslib.es6-01322ba9.js');
require('../wecom-robot/base.js');
require('../wecom-robot/helper.js');
require('axios');
require('../wecom-robot/send-img.js');
require('../node-img/img.js');
require('../git/git-link.js');
require('../slash/slash.js');
function parseEslintAndSendRobot(_a) {
var mrId = _a.mrId,
mrUrl = _a.mrUrl,
lintReportFile = _a.lintReportFile,
repoConfig = _a.repoConfig,
robotInfo = _a.robotInfo;
var webhookUrl = robotInfo.webhookUrl,
chatId = robotInfo.chatId;
var _b = eslintParser_parse.parseEslintError({
lintReportFile: lintReportFile
}),
errorMap = _b.errorMap,
total = _b.total;
console.log('[parseEslintAndSendRobot] total: ', total);
if (!total) return;
var robotMsg = eslintParser_robotMsg.genRobotMsg({
mrId: mrId,
mrUrl: mrUrl,
errorMap: errorMap,
total: total,
repoConfig: repoConfig
});
if (webhookUrl) {
return wecomRobot_batchSend.batchSendWxRobotMarkdown({
webhookUrl: webhookUrl,
chatId: chatId,
content: robotMsg
});
}
}
exports.parseEslintAndSendRobot = parseEslintAndSendRobot;