Repository navigation
changelog generation is not working as expected in case of cz_customize? #466
Description
Activity
Hey bruno, I copied your example, seems to be working well. You see that error because of the
--debugflag. Which gives you extra information, but it is not returning an error (you can see the error code doingecho $?and you'll see is still0).Let me know if that's correct, otherwise we can continue exploring the issue.
Cheers!
Reacted by Wei Lee and Pablo HörtnerHey Santiago, thanks for your input.
I switched on the
--debugflag to check if I have any extra information that could explain what I'm missing, but maybe I was not clear in explaining the issue (btw, I updated the "Desired Behavior" section).I want to generate the changelog (as it is generated by default with cz_conventional_commits) using cz_customize definitions. Maybe I'm missing something in my configuration, but after trying different settings with cz_customize, I'm not able to achieve the changelog generation features:
- Grouping by change_type
- Have only commits following the conventional commits specification/schema pattern
Thanks once again, and let me know if you need further information.
I think the commit_parser regex is not exposed in the customize
commitizen/commitizen/defaults.py
Line 83 in 095f02e
commit_parser = r"^(?P<change_type>feat|fix|refactor|perf|BREAKING CHANGE)(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?:\s(?P<message>.*)?" # noqa and it looks like the customize is using the default from the base
commitizen/commitizen/cz/base.py
Line 30 in 095f02e
commit_parser: Optional[str] = r"(?P<message>.*)" Any thoguhts on this @Lee-W ? Was there a reason for not exposing commit_parser?
Reacted by Bruno Miguel PereiraBack to the time
cz_customizewas designed, it was not designed to have any default value. But there might be some default values accidentally added tocz_cutsomize. What's in my mind now is to deprecatecz_customizeand make the options incz_*customizableReacted by Santiago Fraire Willemoes, Bruno Miguel Pereira and Caspian BaskaAny updates on this topic? I stumbled over this, too. Or do I need to create a custom cz_ plugin?
Reacted by shantonioWe're out of bandwidth to implement this feature these days. PR is welcome 🙂
- addedissue-status: wait-for-implementationmaintainers agree on the bug / featuremaintainers agree on the bug / feature
on Jul 22, 2022 @Lee-W
any updates to use cz_customize with default parser ?No update at this moment. Would appreciate it if anyone wants to take a look 🙂
If anyone else comes across this, like those trying to get a monorepo working with multitple .cz.toml files, you need to add the commit_parser from defeault.py.
[tool.commitizen] name = "cz_customize" version = "0.1.4" tag_format = "componenta-${version}" ignored_tag_formats = "componentb-${version}" # Avoid noise from other tags version_scheme = "semver" update_changelog_on_bump = true changelog_file = "docs/support/changelog.md" template = "CHANGELOG.md.j2" changelog_incremental = true [tool.commitizen.customize] changelog_pattern = "^(feat|fix|refactor|perf|break)\\(componenta.*\\)(!)?:" # Match any conventional commit type with platform scope bump_pattern = "^(feat|fix|refactor|perf|break)\\(componenta.*\\)(!)?" commit_parser = "^(?P<change_type>feat|fix|refactor|perf|break)(?:\\((?P<scope>[^()\r\n]*)\\)|\\()?(?P<breaking>!)?:\\s(?P<message>.*)?"
Spent three days trying to get this to work - hope it saved you sometime.
Reacted by frisia-mtzTriage from #1964: Looks fixed in master (4.15.1).
commitizen/cz/customize/customize.py(lines 40-50) now readschange_type_order,change_type_map,commit_parser, andchangelog_patternfrom the customize section. If anyone can still reproduce on 4.15.1, please share the config — otherwise this can probably be closed.Verification update (re #1964)
My earlier "likely fixed" triage was wrong — I reproduced this against current master (4.15.1):
Config (cz.yaml):
cz_customizewithchange_type_order: ["BREAKING CHANGE", "feat", "fix", "refactor", "chore", "perf"]andchangelog_pattern: '^(feat|fix|chore|refactor|perf)(\(.+\))?(!)?'.Commits:
feat(DL-4567): ...,fix(DL-1234): ...,chore: ....Output of
cz changelog --dry-run:## Unreleased - chore: update deps - fix(DL-1234): qweqwe - feat(DL-4567): new feature test
No
### Feat/### Fixheadings — still ungrouped.Verdict: STILL VALID. Likely root cause:
cz_customizedoesn't auto-derive acommit_parserfromchangelog_pattern, so the changelog generator can't extract achange_typegroup key. Either:- Document that users must also set
commit_parser(with named groups includingchange_type), or - Auto-derive a sensible default
commit_parserfromchangelog_patternforcz_customize.
- Document that users must also set
- added and removedissue-status: wait-for-implementationmaintainers agree on the bug / featuremaintainers agree on the bug / feature
on May 9, 2026
Description
Maybe I'm missing something but I'm not able to generate a changelog properly with custom configurations (cz_customize).
Steps to reproduce
cz --debug changelog --dry-run
Current behavior
I've tried different configurations through cz_customize, although the customization related to commits seems ok, the changelog generation doesn't work for me. I'm not able to generate a changelog as I do with the cz_conventional_commits. There is no filtering on the commits, no grouping by change_type as you can see below.
File: .cz.yaml
cz --debug changelog --dry-runScreenshots
Desired behavior
File: .cz.yaml
cz --debug changelog --dry-run`Screenshots

Environment
Commitizen Version: 2.20.0
Python Version: 3.10.0 (default, Oct 12 2021, 22:37:59) [Clang 13.0.0 (clang-1300.0.29.3)]
Operating System: Darwin