-
Notifications
You must be signed in to change notification settings - Fork 2
/
.cz-config.js
52 lines (51 loc) · 1.78 KB
/
.cz-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
const package = require("./package.json");
function transformationTypes() {
const com = [
{ value: "feat", name: "feat 🍄: 新增新的特性" },
{ value: "fix", name: "fix 🐛: 修复 BUG" },
{ value: "docs", name: "docs 📄: 修改文档、注释" },
{
value: "refactor",
name: "refactor 🎸: 代码重构,注意和特性、修复区分开",
},
{ value: "perf", name: "perf ⚡: 提升性能" },
{ value: "test", name: "test 👀: 添加一个测试" },
{ value: "tool", name: "tool 🚗: 开发工具变动(构建、脚手架工具等)" },
{ value: "style", name: "style ✂: 对代码格式的修改不影响逻辑" },
{ value: "revert", name: "revert 🌝: 版本回滚" },
{ value: "update", name: "update ⬆: 第三方库升级 " },
];
return com.map((item) => {
return {
...item,
value: `${item.value}`,
};
});
}
module.exports = {
types: transformationTypes(),
scopes: [
{ name: "组件" },
{ name: "样式" },
{ name: "文档更改" },
{ name: "其它变更" },
{ name: "npm包" },
],
allowTicketNumber: false,
isTicketNumberRequired: false,
ticketNumberPrefix: "TICKET-",
ticketNumberRegExp: "d{1,5}",
messages: {
type: "选择一种你的提交类型:",
scope: "选择一个scope (可选):",
customScope: "Denote the SCOPE of this change:",
subject: "简要说明:\n",
body: '详细说明,使用"|"换行(可选):\n',
breaking: "非兼容性说明 (可选):\n",
footer: "关联的迭代版本号,例如:#31, #34(可选):\n",
confirmCommit: "确定提交?",
},
allowCustomScopes: true,
allowBreakingChanges: ["新增", "修复"],
subjectLimit: 100,
};