UNPKG

t-comm

Version:

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

45 lines (42 loc) 1.21 kB
import { batchSendWxRobotMarkdown } from '../wecom-robot/batch-send.mjs'; import { parseEslintError } from './parse.mjs'; import { genRobotMsg } from './robot-msg.mjs'; import '../tslib.es6-096fffdd.js'; import '../wecom-robot/base.mjs'; import '../wecom-robot/helper.mjs'; import 'axios'; import '../wecom-robot/send-img.mjs'; import '../node-img/img.mjs'; import '../git/git-link.mjs'; import '../slash/slash.mjs'; 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 };