# cz-conventional-changelog-for-cmss

> #### Description Commitizen adapter following the conventional-changelog format and adapter cmss jira issue

Latest version **1.0.2** (published 2022-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install cz-conventional-changelog-for-cmss
pnpm add cz-conventional-changelog-for-cmss
yarn add cz-conventional-changelog-for-cmss
bun add cz-conventional-changelog-for-cmss
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-01-13 |
| First published | 2022-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 10 |
| Dependencies | 8 |
| Unpacked size | 16.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aki |
| Maintainers | akisong |

## Links

- npm: https://www.npmjs.com/package/cz-conventional-changelog-for-cmss
- Repository: https://gitee.com/song_jiawei/cz-conventional-changelog-for-cmss
- npm.io page: https://npm.io/package/cz-conventional-changelog-for-cmss

## Dependencies (8)

- [boxen](https://npm.io/package/boxen.md) ~5.0.0
- [chalk](https://npm.io/package/chalk.md) ~2.4.1
- [longest](https://npm.io/package/longest.md) ^2.0.1
- [right-pad](https://npm.io/package/right-pad.md) ^1.0.1
- [word-wrap](https://npm.io/package/word-wrap.md) ^1.2.3
- [commitizen](https://npm.io/package/commitizen.md) ^4.2.4
- [lodash.map](https://npm.io/package/lodash.map.md) ^4.6.0
- [@commitlint/load](https://npm.io/package/@commitlint/load.md) ^16.0.0

## Recent versions

- 1.0.2 (latest) — 2022-01-13
- 1.0.1 — 2022-01-13
- 1.0.0 — 2022-01-13

## README

# cz-conventional-changelog-for-cmss

#### 介绍

基于@digitalroute/cz-conventional-changelog-for-jira 开源项目开发, 适配 cmss jira issue 模板

#### 安装教程

1. 安装 commit 规范校验插件

```js
npm install @commitlint/cli @commitlint/config-conventional -D
```

2.  安装 commitizen 插件

```js
npm install commitizen cz-conventional-changelog-for-cmss  -D
```

3.  安装 husky

```js
npm install husky -D
```

#### 使用说明

1. package.json 添加脚本

```json
{
  "scripts": {
    "cz": "git-cz"
  },
  "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog-for-cmss"
    }
  }
}
```

2.  执行 husky 初始化

```js
npx husky install
npx husky add .husky/commit-msg
cd .husky/commit-msg
```

在.husky/commit-msg 写入

```js
npx --no-install commitlint --edit "$1"
source "$(dirname "$1")/hooks/commit-msg"
```

3. 自定义属性基本参照@digitalroute/cz-conventional-changelog-for-jira

特殊改动:
  scope 部分不再是 list 下拉表，skipScope 默认 true， 默认值为当前分支。 false 情况下， 为 input 输入 scope
  body 部分有固定格式， 现在 body 输入只用于描述
  去除 breaking，issue
  ```js
    Code Source From: Self Code
    Description:
    Jira: #JIRA
    市场项目编号（名称）:
  ```

4. 创建commitlint.config.js
添加commit-lint规范
```js
module.exports = {
  ignores: [(commit) => commit.includes('init')],
  extends: ['@commitlint/config-conventional'],
  rules: {
    'body-leading-blank': [0],
    'footer-leading-blank': [0],
    'header-max-length': [2, 'always', 180],
    'subject-empty': [2, 'never'],
    'type-empty': [2, 'never'],
    'subject-case': [0],
    'type-enum': [
      2,
      'always',
      [
        'feat',
        'fix',
        'style',
        'docs',
        'refactor',
        'revert',
        'release'
      ]
    ]
  }
}

```

---
_Source: https://npm.io/package/cz-conventional-changelog-for-cmss · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
