项目作者: bi-zone

项目描述 :
cz-conventional-changelog with Jira support
高级语言: JavaScript
项目地址: git://github.com/bi-zone/cz-conventional-changelog-bizone.git
创建时间: 2020-04-10T14:15:10Z
项目社区:https://github.com/bi-zone/cz-conventional-changelog-bizone

开源协议:MIT License

下载


cz-conventional-changelog-bizone

Part of the commitizen family. Prompts for conventional changelog standard.

Configuration

Rules for release.config.js

Using the semantic-release commit-analyzer plugin, add this to config:

  1. [
  2. [
  3. '@semantic-release/commit-analyzer',
  4. {
  5. preset: 'angular',
  6. releaseRules: './node_modules/cz-conventional-changelog-bizone/rules.js'
  7. }
  8. ]
  9. ]

package.json

Like commitizen, you specify the configuration of cz-conventional-changelog-bizone through the package.json’s config.commitizen key.

  1. {
  2. // ... default values
  3. config: {
  4. commitizen: {
  5. path: './node_modules/cz-conventional-changelog',
  6. maxHeaderWidth: 100,
  7. maxLineWidth: 100,
  8. defaultType: '',
  9. defaultScope: '',
  10. defaultSubject: '',
  11. defaultBody: '',
  12. defaultIssues: ''
  13. }
  14. }
  15. // ...
  16. }

Environment variables

The following environment varibles can be used to override any default configuration or package.json based configuration.

  • CZ_TYPE = defaultType
  • CZ_SCOPE = defaultScope
  • CZ_SUBJECT = defaultSubject
  • CZ_BODY = defaultBody
  • CZ_MAX_HEADER_WIDTH = maxHeaderWidth
  • CZ_MAX_LINE_WIDTH = maxLineWidth

Commitlint

If using the commitlint js library, the “maxHeaderWidth” configuration property will default to the configuration of the “header-max-length” rule instead of the hard coded value of 100. This can be ovewritten by setting the ‘maxHeaderWidth’ configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.

Made with 🍺, 😭 and 🤣 by BI.ZONE frontend team