Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

changelog_hook not called when "--dry-run" is passed #620

Copy link
Copy link
Open
@c0dearm

Description

@c0dearm
Issue body actions

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 the changelog_hook in my custom class: https://commitizen-tools.github.io/commitizen/customization/#custom-changelog-generator

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

  1. Create a custom class inheriting from BaseCommitizen
  2. Write the changelog_hook method and do something visible.
  3. Set up your project configuration so that your custom class is used by Commitizen
  4. Commit something and perform a cz bump --changelog --dry-run
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.