Skip to main content

Extends Conventional Commits Change Types with User-Defined Legacy Types for Commitizen

Project description


Custom Commitizen parser for user-specified legacy change types. The parser utilizes the cz_conventional_commits pattern and extends with the tag mapping specified in the configuration file

While old change types will appear in the Changelog, the user will be prevented from using them in new commits. This is the reverse of the revert/chore logic from commitizen that allows use of those commit types, but won't display them in the changelog


This customization only works when old commits use the <change_type>: <message> format that can be parsed by commitizen. If that doesn't fit your use case, you may want to try out incremental which (I think) prepends to an existing CHANGELOG



Install the package from PyPi: pip install cz_legacy or from git: pip install git+


At minimum, you must have the name = "cz_legacy" and [tool.commitizen.cz_legacy_map] in your configuration file. The below example is for TOML, you can also utilize a YAML or JSON file.

Below is an example of the three change legacy types Chg, Fix, and New, but the user can choose any tag names and associated mapping for the Changelog

name = "cz_legacy"
# Other tool.commitizen configuration options

Chg = "Change (old)"
Fix = "Fix (old)"
New = "New (old)"


To use in pre-commit, add this to your pre-commit-config.yml

  - repo:
    rev: v2.11.1
      - id: commitizen
        additional_dependencies: [cz_legacy]
        stages: [commit-msg]


If you have any feature requests, run into any bugs, or have questions, feel free to start a discussion or open an issue on Github at


I couldn't find a good way of adding a few legacy change types from an old commit style to commitizen so I built a package to extend the ConventionalCommitsCz to provide custom logic. For reference, these are the default settings


See the Open Issues and Milestones for current status and ./docs/ for annotations in the source code.

For release history, see the ./docs/


See the Developer Guide, Contribution Guidelines, etc



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cz_legacy-0.1.7.tar.gz (4.8 kB view hashes)

Uploaded source

Built Distribution

cz_legacy-0.1.7-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page