-
Notifications
You must be signed in to change notification settings - Fork 17
/
.cz-config.js
60 lines (60 loc) · 2.44 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
53
54
55
56
57
58
59
60
module.exports = {
types: [
{ value: ':sparkles: feat', name: '✨ feat: 一项新功能' },
{ value: ':bug: fix', name: '🐛 fix: 修复一个Bug' },
{ value: ':memo: docs', name: '📝 docs: 文档变更' },
{ value: ':lipstick: style', name: '💄 style: 代码风格,格式修复' },
{ value: ':recycle: refactor', name: '♻️ refactor: 代码重构,注意和feat、fix区分开' },
{ value: ':zap: perf', name: '⚡️ perf: 代码优化,改善性能' },
{ value: ':white_check_mark: test', name: '✅ test: 测试' },
{ value: ':rocket: chore', name: '🚀 chore: 变更构建流程或辅助工具' },
{ value: ':rewind: revert', name: '⏪️ revert: 代码回退' },
{ value: ':tada: init', name: '🎉 init: 项目初始化' },
{ value: ':construction_worker: ci', name: '👷 ci: 对CI配置文件和脚本的更改' },
{ value: ':package: build', name: '📦️ build: 变更项目构建或外部依赖' },
{ value: ':construction: WIP', name: '🚧 WIP: 进行中的工作' }
],
scopes: [
{ name: 'component' },
{ name: 'config' },
{ name: 'docs' },
{ name: 'src' },
{ name: 'examples' },
{ name: 'play' }
],
// allowTicketNumber: false,
// isTicketNumberRequired: false,
// ticketNumberPrefix: 'TICKET-',
// ticketNumberRegExp: '\\d{1,5}',
// it needs to match the value for field type. Eg.: 'fix'
// scopeOverrides: {
// feat: [
// { name: 'element' }
// ],
// fix: [
// { name: 'element' },
// { name: 'style' },
// ]
// },
// override the messages, defaults are as follows
messages: {
type: '请选择提交类型(必填):',
scope: '请选择一个scope (可选):',
customScope: '请输入文件修改范围(可选):',
// used if allowCustomScopes is true
subject: '请简要描述提交(必填):',
body: '请输入详细描述,使用"|"换行(可选):\n',
breaking: '列出任务非兼容性说明 (可选):\n',
footer: '请输入要关闭的issue,例如:#12, #34(可选):\n',
confirmCommit: '确定提交此说明吗?'
},
allowCustomScopes: true,
allowBreakingChanges: ['feat', 'fix'],
// 限制 subject 长度
subjectLimit: 72
// 跳过问题 skip any questions you want
// skipQuestions: ['body', 'footer'],
// breaklineChar: '|', // It is supported for fields body and footer.
// footerPrefix : 'ISSUES CLOSED:'
// askForBreakingChangeFirst : true, // default is false
}