UNPKG

t-comm

Version:

专业、稳定、纯粹的工具库

44 lines (41 loc) 1.18 kB
import { parseEslintError } from './parse.js'; import { genRobotMsg } from './robot-msg.js'; import { batchSendWxRobotMarkdown } from '../wecom-robot/batch-send.js'; import '../tslib.es6-48fa7a9b.js'; import '../git/git-link.js'; import '../slash/slash.js'; import '../wecom-robot/send-img.js'; import '../wecom-robot/base.js'; import '../wecom-robot/helper.js'; import '../node-img/img.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 = parseEslintError({ lintReportFile: lintReportFile }), errorMap = _b.errorMap, total = _b.total; console.log('[parseEslintAndSendRobot] total: ', total); if (!total) return; var robotMsg = genRobotMsg({ mrId: mrId, mrUrl: mrUrl, errorMap: errorMap, total: total, repoConfig: repoConfig }); if (webhookUrl) { return batchSendWxRobotMarkdown({ webhookUrl: webhookUrl, chatId: chatId, content: robotMsg }); } } export { parseEslintAndSendRobot };