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

commit message have a space #144

Open
dengshenkk opened this issue Nov 16, 2020 · 4 comments
Open

commit message have a space #144

dengshenkk opened this issue Nov 16, 2020 · 4 comments

Comments

@dengshenkk
Copy link

dengshenkk commented Nov 16, 2020

config file .cz.config.js

'use strict'
const PROJECT_NAME = 'PROJECT'
module.exports = {
  types: [
    {
      value: '✨特性',
      name: '特性:    一个新的特性'
    },
    {
      value: '🐛修复',
      name: '修复:    修复一个Bug'
    }],
  scopes: [
    { name: '基础模块' },
    { name: '业务模块' },
    { name: '其他模块请选择自定义后自行输入' }
  ],
  messages: {
    type: '选择一种你的提交类型:',
    scope: '选择一个scope (可选):',
    customScope: '描述本次提交影响的范围:',
    subject: '短标题:\n',
    body: '长说明,使用"|"换行(可选):\n',
    breaking: '非兼容性说明 (可选):\n',
    footer: '关联关闭的issue数字,例如:31, 34(可选):\n',
    confirmCommit: '确定提交说明?'
  },
  footerPrefix: `Closes ${ PROJECT_NAME }-`,
  allowCustomScopes: true,
  allowBreakingChanges: ['特性', '修复'],
  subjectLimit: 100
}

step

? 选择一种你的提交类型: 修复:    修复一个Bug
? 选择一个scope (可选): 基础模块
? 短标题:
 修复688
? 长说明,使用"|"换行(可选):
 
? 关联关闭的issue数字,例如:31, 34(可选):
 688

###--------------------------------------------------------###
🐛修复(基础模块): 修复688

Closes PROJECT- 688
###--------------------------------------------------------###

? 确定提交说明? Yes

description

Close PROJECT- 688 here, the number before have a space.
the jira system close issues can't have a space

expect

  • footerPrefix message like this:
    Closes PROJECT-688
    no space
@dengshenkk
Copy link
Author

maybe, the problem happend in here

return `\n\n${footerPrefix} ${addBreaklinesIfNeeded(footer, config.breaklineChar)}`;

mwjaco added a commit to mwjaco/cz-customizable that referenced this issue Sep 13, 2021
mwjaco added a commit to mwjaco/cz-customizable that referenced this issue Sep 13, 2021
@yiqianglin
Copy link

请问楼主这边是怎么支持的中文和emoji?我这边只要配置使用了中文的type,commitlint检测就会出现 subject 和 type 为空
image

@dengshenkk
Copy link
Author

请问楼主这边是怎么支持的中文和emoji?我这边只要配置使用了中文的type,commitlint检测就会出现 subject 和 type 为空 image

你复制上面的配置不能用吗?

@baixjian
Copy link

I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants