Skip to content

Instantly share code, notes, and snippets.

@heycqing
Created February 3, 2021 09:47
Show Gist options
  • Select an option

  • Save heycqing/b982baabd75a742154ddf3965c957425 to your computer and use it in GitHub Desktop.

Select an option

Save heycqing/b982baabd75a742154ddf3965c957425 to your computer and use it in GitHub Desktop.
'use strict';
module.exports = {
types: [
{value: 'feat', name: '特性: 一个新的特性'},
{value: 'fix', name: '修复: 修复一个Bug'},
{value: 'docs', name: '文档: 变更的只有文档'},
{value: 'style', name: '格式: 空格, 分号等格式修复'},
{value: 'refactor', name: '重构: 代码重构,注意和特性、修复区分开'},
{value: 'perf', name: '性能: 提升性能'},
{value: 'test', name: '测试: 添加一个测试'},
{value: 'chore', name: '工具: 开发工具变动(构建、脚手架工具等)'},
{value: 'revert', name: '回滚: 代码回退'}
],
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: '选择一种你的提交类型:',
scope: '选择此次的修改范围[模块](可选):',
// used if allowCustomScopes is true
customScope: 'Denote the SCOPE of this change:',
subject: '短说明:\n',
body: '长说明,使用"|"换行(可选):\n',
breaking: '列出破坏性(非兼容性)更改 (可选):\n',
footer: '关联关闭的issue,例如:#31, #34(可选):\n',
confirmCommit: '确定提交说明?'
},
// 选择关闭可选范围的填入
allowCustomScopes: false,
// 选择跳过填入范围
skipQuestions: ['scope','customScope','body', 'footer'],
allowBreakingChanges: ['feat', 'fix'],
// limit subject length
subjectLimit: 100
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment