Cz-cli: How to add custom commit types?

Created on 26 Oct 2015  路  3Comments  路  Source: commitizen/cz-cli

Is it possible to create new type(scope): title... commit types? We're using this in tandem with clog and we have some custom commit types defined for the changelog.

adapter question

Most helpful comment

Almost 5 years later, but is there any "easier" solution to this rather than forking and publishing an adapter?

All 3 comments

The easiest way to do this is to create an adapter.

To do this:

  1. Fork the commitizen/cz-conventional-changelog repo.
  2. Change the package.json's name field to your new adapter name (ie. cz-emcniece-changelog) and set the version field to 1.0.0.
  3. Edit index.js to have your custom types.
  4. npm publish when you're ready to publish your adapter to npm.
  5. In any repo you want to use your new adapter you can just run commitizen init cz-emcniece-changelog --save-dev --save-exact. If the repo already has an adapter installed then you a can add the --force flag to that last command and it will overwrite your old config.

Awesome - thanks so much for the guide!

Almost 5 years later, but is there any "easier" solution to this rather than forking and publishing an adapter?

Was this page helpful?
0 / 5 - 0 ratings