Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.3 KB

breakingchange.md

File metadata and controls

51 lines (39 loc) · 1.3 KB

markBreakingChangeMode

添加 ! 标识,表明该 commit 消息属于重大变更

See: 该规则来自 Conventional Commits
E.g:

# Commit message 带有 ! 提示重大变更
feat!: send an email to the customer when a product is shipped

# Commit message 与范围以及 ! 标识提示重大变更
feat(api)!: send an email to the customer when a product is shipped

# Commit message 带有 ! 提示重大变更以及底部说明
chore!: drop support for Node 6

BREAKING CHANGE: use JavaScript features not available in Node 6.

使用配置项: markBreakingChangeMode

额外添加 "BREAKINGCHANGE"的提问,询问是否需要添加 =="!"== 标识

// .commitlintrc.js

/** @type {import('cz-git').UserConfig} */
module.exports = {
  prompt: {
    markBreakingChangeMode: true
  }
};

示例: demo

使用 commitizen CLI + cz-git

可以尝试运行命令自动添加标识:

break=1 cz

示例: demo

使用 cz-git CLI czg

可以尝试运行命令自动添加标识:

czg break

示例: