changelog generation is not working as expected in case of cz_customize?
See original GitHub issueDescription
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
commitizen:
name: cz_customize
customize:
message_template: "{{change_type}}:{% if show_message %} {{message}}{% endif %}"
example: 'feature: this feature enable customize through config file'
schema: "<type>: <body>"
schema_pattern: (build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)(\(\S+\))?!?:(\s.*)
changelog_pattern: ^(feat|fix|chore|refactor|perf)(\(.+\))?(!)?
change_type_order: ["BREAKING CHANGE", "feat", "fix", "refactor", "chore", "perf"]
info_path: cz_customize_info.txt
info: This is customized info
questions:
- type: list
name: change_type
choices:
- value: feature
name: 'feature: A new feature.'
- value: bug fix
name: 'bug fix: A bug fix.'
message: Select the type of change you are committing
- type: input
name: message
message: Body.
- type: confirm
name: show_message
message: Do you want to add body message in commit?
cz --debug changelog --dry-run
## Unreleased
- feat(DL-4567): new feature test
- fix(DL-1234): qweqwe
Screenshots
Desired behavior
File: .cz.yaml
commitizen:
name: cz_customize
customize:
message_template: "{{change_type}}:{% if show_message %} {{message}}{% endif %}"
example: 'feature: this feature enable customize through config file'
schema: "<type>: <body>"
schema_pattern: (build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)(\(\S+\))?!?:(\s.*)
changelog_pattern: ^(feat|fix|chore|refactor|perf)(\(.+\))?(!)?
change_type_order: ["BREAKING CHANGE", "feat", "fix", "refactor", "chore", "perf"]
info_path: cz_customize_info.txt
info: This is customized info
questions:
- type: list
name: change_type
choices:
- value: feature
name: 'feature: A new feature.'
- value: bug fix
name: 'bug fix: A bug fix.'
message: Select the type of change you are committing
- type: input
name: message
message: Body.
- type: confirm
name: show_message
message: Do you want to add body message in commit?
cz --debug changelog --dry-run`
## Unreleased
### Feat
- **DL-4567**: new feature test
### Fix
- **DL-1234**: qweqwe
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
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
commitizen/CHANGELOG.md at master - GitHub
Create committing rules for projects :rocket: auto bump versions :arrow_up: and auto changelog generation :open_file_folder: - commitizen/CHANGELOG.md at ...
Read more >Changelog generation from Github issues? - Stack Overflow
You can try to use Github-Changelog-Generator. (I'm author of this project). It generates changelog from tags and merged pull-requests.
Read more >commitizen Changelog - PyUp.io
**git**: test the git log parser behaves properly when the repository has no commits - **changelog**: fixes logic issue made evident by latest...
Read more >How To Automatically Generate A Helpful Changelog From ...
In my opinion, it is worth the effort to introduce the Git commit convention and the changelog generation in projects. We as developers...
Read more >A Beginner's Guide to Git — What is a Changelog and How to ...
Or if you are working on an open-source project, you can find a "CHANGELOG.md" file in the GitHub repository. This file aims to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Back to the time
cz_customize
was 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_customize
and make the options incz_*
customizableHey bruno, I copied your example, seems to be working well. You see that error because of the
--debug
flag. 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!