Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Customizable commit-analyzer plugin for [semantic-release](https://github.com/se

## Options

By default `commit-analyzer` uses the `angular` format described in [Angular convention](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/convention.md).
By default `commit-analyzer` uses the `angular` format described in [Angular convention](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/convention.md) and the [default rules](lib/default/release-rules.js) for release.

Additionnal options can be set within the plugin definition in `package.json` to use a different commit format and to customize it:
Additional options can be set within the plugin definition in `package.json` to use a different commit format and to customize it:

```json
{
Expand Down Expand Up @@ -48,6 +48,8 @@ Additionnal options can be set within the plugin definition in `package.json` to

### Release Rules

Release rules are used when deciding if the commits since the last release warrant a new release. If you define custom release rules the [default rules](lib/default/release-rules.js) will be used if nothing matched.

#### Rules definition
This is an `Array` of rule objects. A rule object has a `release` property and 1 or more criteria.
```json
Expand Down Expand Up @@ -77,7 +79,7 @@ With the previous example:

#### Default rules matching

If a commit doesn't match any rule in `releaseRules` it will be evaluated agaisnt the [default release rules](lib/default/release-rules.js).
If a commit doesn't match any rule in `releaseRules` it will be evaluated against the [default release rules](lib/default/release-rules.js).

With the previous example:
* Commits with a breaking change will be associated with a `minor` release.
Expand All @@ -96,7 +98,7 @@ With the previous example:

#### Multiple commits

If there is multiple commits that match one or more rules, the one with the highest realease type will determine the global release type.
If there is multiple commits that match one or more rules, the one with the highest release type will determine the global release type.

Considering the following commits:
* `docs(README): Add more details to the API docs`
Expand All @@ -106,7 +108,7 @@ With the previous example the release type determine by the plugin will be `mino

#### Specific commit properties

The properties to set in the rules will depends on the commit style choosen. For example [conventional-changelog-angular](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/index.js#L9-L13) use the commit properties `type`, `scope` and `subject` but [conventional-changelog-eslint](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-eslint/index.js#L9-L12) uses `tag` and `message`.
The properties to set in the rules will depends on the commit style chosen. For example [conventional-changelog-angular](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/index.js#L9-L13) use the commit properties `type`, `scope` and `subject` but [conventional-changelog-eslint](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-eslint/index.js#L9-L12) uses `tag` and `message`.

For example with `eslint` preset:
```json
Expand Down