t-comm
Version:
专业、稳定、纯粹的工具库
34 lines (29 loc) • 1.31 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var git_git = require('../git/git.js');
require('../tslib.es6-01322ba9.js');
require('../node/node-command.js');
require('@babel/runtime/helpers/typeof');
var genTitle = function genTitle(prefix, checkAll, name) {
if (name === void 0) {
name = 'LINT';
}
return "".concat(prefix).concat(checkAll ? "\u3010".concat(name, "\u3011\u5168\u91CF\u6A21\u5F0F") : "\u3010".concat(name, "\u3011\u589E\u91CF\u6A21\u5F0F"));
};
var genReportInfo = function genReportInfo(_a) {
var workspace = _a.workspace,
mrUrl = _a.mrUrl,
sourceBranch = _a.sourceBranch,
targetBranch = _a.targetBranch,
repo = _a.repo,
repoUrl = _a.repoUrl,
_b = _a.checkAll,
checkAll = _b === void 0 ? false : _b;
var curBranch = git_git.getGitCurBranch(workspace, false);
var repoAndMrInfo = [mrUrl ? "[".concat(mrUrl, "](").concat(mrUrl, ")") : '', sourceBranch && targetBranch ? "".concat(sourceBranch, " => ").concat(targetBranch) : '', checkAll && repo && repoUrl ? "[".concat(repo, "](").concat(repoUrl, ")") : '', checkAll && curBranch ? "\u5206\u652F: ".concat(curBranch) : ''].filter(function (item) {
return item;
});
return repoAndMrInfo;
};
exports.genReportInfo = genReportInfo;
exports.genTitle = genTitle;