Skip to main content

cz_legacy

[!NOTE] After using commitizen for a few years, the utility of cz_legacy for changelogs from years ago has become less valuable. Based on public code, this package doesn't appear to have use outside of my projects and therefore will be archived. If you have a use case for this project or questions, please feel free to submit an issue and tag me (@kyleking) here: https://github.com/KyleKing/calcipy

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.

Alternatives

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

Usage

Pre-Commit

To use in pre-commit, add this to your pre-commit-config.yml. Run pre-commit autoupdate to get the latest version

repos:
  - repo: https://github.com/commitizen-tools/commitizen
    rev: main
    hooks:
      - id: commitizen
        additional_dependencies: [cz_legacy]
        stages: [commit-msg]

Configuration

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

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

[tool.commitizen.cz_legacy_map]
Chg = "Change (old)"
Fix = "Fix (old)"
New = "New (old)"

Issues

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 https://github.com/kyleking/cz_legacy.

Project Status

See the Open Issues and/or the CODE_TAG_SUMMARY. For release history, see the CHANGELOG.

Contributing

We welcome pull requests! For your pull request to be accepted smoothly, we suggest that you first open a GitHub issue to discuss your idea. For resources on getting started with the code base, see the below documentation:

Code of Conduct

We follow the Contributor Covenant Code of Conduct.

Open Source Status

We try to reasonably meet most aspects of the "OpenSSF scorecard" from Open Source Insights

Responsible Disclosure

If you have any security issue to report, please contact the project maintainers privately. You can reach us at dev.act.kyle@gmail.com.

License

LICENSE

Metadata

Release files for cz_legacy 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cz_legacy 2.0.2
File Size Uploaded
cz_legacy-2.0.2.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cz_legacy 2.0.2
File Interpreter ABI Platform
cz_legacy-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.1 kB

Release files / cz_legacy-2.0.2.tar.gz

Download URL cz_legacy-2.0.2.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a6a1e175e73329a5333a3feac34680a764759fac06e405598e33b06d67002362
BLAKE2b-256 checksum
How to use checksums
a5a59e4868e5614872e64ecdac44615b11b7fab073762954c9fc4deccf76b424
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0

Release files / cz_legacy-2.0.2-py3-none-any.whl

Download URL cz_legacy-2.0.2-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53fee8c4237e94a8135a7faf1f63a64fd9068a6421cf39dec00c280d3f2abe7f
BLAKE2b-256 checksum
How to use checksums
b0bb3958312f85d2ded41c1ffcbfd2527c3a43c09bc19280e30439dcfc383194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page