Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add cn config demo #139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions cz-config-EXAMPLE-cn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
module.exports = {
types: [
{value: 'feat', name: 'feat: 新功能'},
{value: 'fix', name: 'fix: 修复Bug'},
{value: 'docs', name: 'docs: 文档变动'},
{value: 'style', name: 'style: 不影响代码含义的变化(空白、格式化、缺少分号等)'},
{value: 'refactor', name: 'refactor: 重构代码,既不修复错误也不添加功能'},
{value: 'perf', name: 'perf: 性能优化'},
{value: 'test', name: 'test: 测试相关'},
{value: 'chore', name: 'chore: 重新打包或更新依赖工具等杂活'},
{value: 'revert', name: 'revert: Revert to a commit'},
{value: 'wip', name: 'wip: Work in progress'},
],

scopes: [{ name: 'accounts' }, { name: 'admin' }, { name: 'exampleScope' }, { name: 'changeMe' }],


allowTicketNumber: false,
isTicketNumberRequired: false,
ticketNumberPrefix: 'TICKET-',
ticketNumberRegExp: '\\d{1,5}',

// it needs to match the value for field type. Eg.: 'fix'
/*
scopeOverrides: {
fix: [
{name: 'merge'},
{name: 'style'},
{name: 'e2eTest'},
{name: 'unitTest'}
]
},
*/
// override the messages, defaults are as follows
messages: {
type: '请选择 Commit 类型:',
scope: '请选择影响范围 (Scope) (可选):',
customScope: '请选择影响范围 (Scope) (可选):',
subject: '请提供一段简要的 Commit 信息:\n',
body: '请提供一段详细的信息来描述此次更改 (可选). 使用 "|" 来另起一行:\n',
breaking: '是否有任何 BREAKING CHANGES (可选):\n',
footer: '是否有任何 ISSUE 可以被此次 Commit 关闭 (可选). E.g.: #31, #34:\n',
confirmCommit: '是否确认提交上述 Commit 信息?'
},

allowCustomScopes: true,
allowBreakingChanges: ['body'],

// limit subject length
subjectLimit: 100,
// breaklineChar: '|', // It is supported for fields body and footer.
// footerPrefix : 'ISSUES CLOSED:'
// askForBreakingChangeFirst : true, // default is false
};