Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(types): add suport for custom types #104

Merged
merged 3 commits into from May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 14 additions & 6 deletions README.md
Expand Up @@ -17,25 +17,33 @@ Like commitizen, you specify the configuration of cz-conventional-changelog thro
{
// ... default values
"config": {
"commitizen": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog",
"maxHeaderWidth": 100,
"maxLineWidth": 100,
"defaultType": "",
"defaultScope": "",
"defaultScope": "",
"defaultSubject": "",
"defaultBody": "",
"defaultIssues": ""
"defaultIssues": "",
"types": {
...
"feat": {
"description": "A new feature",
"title": "Features"
},
...
}
}
}
// ...
// ...
}
```
```
### Environment variables

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

* CZ_TYPE = defaultType
* CZ_TYPE = defaultType
* CZ_SCOPE = defaultScope
* CZ_SUBJECT = defaultSubject
* CZ_BODY = defaultBody
Expand Down
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -6,7 +6,7 @@ var configLoader = require('commitizen').configLoader;

var config = configLoader.load();
var options = {
types: conventionalCommitTypes.types,
types: config.types || conventionalCommitTypes.types,
defaultType: process.env.CZ_TYPE || config.defaultType,
defaultScope: process.env.CZ_SCOPE || config.defaultScope,
defaultSubject: process.env.CZ_SUBJECT || config.defaultSubject,
Expand Down