commitlint config-conventional-为提交消息添加前缀

时间:2020-03-11 02:02:18

标签: node.js git github github-actions

我正在尝试为我的一个仓库实现 commitlint ,因此所有提交消息都是标准的。但是,我们要求添加JIRA ID作为前缀的一部分。

当前,commitlint格式如下

subject(scope): message 

我需要如下所述

JIRA-ID: subject(scope): message 

以下作品

parserPreset: {
    parserOpts: {
         issuePrefixes: ['w{2,4}-[0.9]{2,4}']
    }
}

但是它验证JIRA id应该在末尾。如下

subject(scope): message JIRA-ID

1 个答案:

答案 0 :(得分:0)

你可以使用这个包 https://github.com/Gherciu/commitlint-jira 它以 Jira 提交风格开箱即用 ;)

有关提示和Advanced Usage,您可以阅读此Blog Post

相关问题