You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently though, that hook is never called by Commitizen, so it is rather usless. From a quick search in the code, I can see its only appearance is the declaration in the BaseCommitizen class.
Steps to reproduce
Create a custom class inheriting from BaseCommitizen
Write the changelog_hook method and do something visible.
Set up your project configuration so that your custom class is used by Commitizen
Commit something and perform a cz bump --changelog --dry-run
Check how the changelog remains being the default.
Current behavior
Nothing happens and the changelog remains the same.
Desired behavior
The changelog_hook should be called and the outputted changelog should have the changes that were applied in the method.
Screenshots
No response
Environment
Commitizen Version: 2.37.0
Python Version: 3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0]
Operating System: Linux
The text was updated successfully, but these errors were encountered:
After some more investigation I saw it is actually called, but only when generating the real changelog file, not during dry-runs. Probably it should work with dry-runs too.
Lee-W
changed the title
changelog_hook not used at all?changelog_hook not called when "--dry-run" is passed
Dec 3, 2022
Description
I am trying to modify the default changelog created by
Commitizen
to add a few links at the end of it. For that, I saw in the documentation I could use thechangelog_hook
in my custom class: https://commitizen-tools.github.io/commitizen/customization/#custom-changelog-generatorApparently though, that hook is never called by
Commitizen
, so it is rather usless. From a quick search in the code, I can see its only appearance is the declaration in theBaseCommitizen
class.Steps to reproduce
BaseCommitizen
changelog_hook
method and do something visible.Commitizen
cz bump --changelog --dry-run
Current behavior
Nothing happens and the changelog remains the same.
Desired behavior
The
changelog_hook
should be called and the outputted changelog should have the changes that were applied in the method.Screenshots
No response
Environment
The text was updated successfully, but these errors were encountered: