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

标签 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

最佳答案

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

提示和 Advanced Usage你可以阅读这个Blog Post

关于node.js - commitlint config-conventional - 为提交消息添加前缀,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60628281/

相关文章:

node.js - 浏览器重复创建与 websocket 的连接 - socket.io

node.js - Heroku 上的 Node cron 作业,是否需要使用 heroku 调度程序?

merge 后Git pull没有结果

git - 在 SVN 到 Git 迁移期间将 SVN 远程分支和标签转换为本地 Git 分支/标签的正确方法是什么

git - git 中的 svnadmin 转储

git - 在 Github 上更改 PR 的源代码分支

javascript - 如何在 react 中运行脚本

Github Insights 不显示特定用户提交

python - Github api v3 通过 python oauth2 库访问 - 重定向问题

node.js - 使用 redis 作为 REST Api 用户的缓存(为了保存 Api 请求)