mol-conventional-changelog

2018-10-11 admin

mol-conventional-changelog是什么

什么是mol-conventional-changelog,MOL Commitizen adapter following the conventional-changelog format

mol-conventional-changelog使用教程帮助文档

Commitizen friendly

mol-conventional-changelog

Setup

Install commitizen

npm install -g commitizen

Install the mol-conventional-changelog package.

npm install --save-dev mol-conventional-changelog

Init commitizen configuration

commitizen init mol-conventional-changelog --save-dev --save-exact

Usage

git cz

Examples

feat: 🎸 add 'graphiteWidth' option

fix: 🐞 stop graphite breaking when width < 0.1

perf: ⚡️ remove graphiteWidth option

BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reason.

Issues: MOL-1234

Custom config

You can provide custom configuration in changelog.congfig.js file in your repo. See default configuration file for reference.

Commit Message Format

  • A commit message consists of a header, body and footer.
  • The header has a type and a subject:
{{type}}: {{subject}}
<BLANK LINE>
{{body}}
<BLANK LINE>
{{breaking changes}}
<BLANK LINE>
{{footer}}

The header is the only mandatory part of the commit message.

The first line (type + subject) is limited to 50 characters [enforced]

Any other line should be limited to 72 character [automatic wrapping]

This allows the message to be easier to read on GitHub as well as in various git tools.

Type

Must be one of the following:

  • feat: A new feature.
  • fix: A bug fix.
  • docs: Documentation only changes.
  • style: Markup-only changes (white-space, formatting, missing semi-colons, etc).
  • refactor: A code change that neither fixes a bug or adds a feature.
  • perf: A code change that improves performance.
  • test: Adding or updating tests.
  • chore: Build process or auxiliary tool changes.
  • ci: CI related changes.

Subject

The subject contains succinct description of the change:

  • Use the imperative, present tense: “change” not “changed” nor “changes”
  • No dot (.) at the end.

Body

Just as in the subject, use the imperative, present tense: “change” not “changed” nor “changes”. The body should include the motivation for the change and contrast this with previous behavior.

Affects [only on lerna environments]

Select the packages the commit affected.

Breaking Changes

Breaking Changes must start with the words BREAKING CHANGE:.

Footer

The footer is the place to reference any tasks related to this commit.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-42429.html

文章标题:mol-conventional-changelog

回到顶部