How to add link issue on changelog?
Description
if my commit message is
feat: add feat #1
in CHANGELOG.md it doesn't linked to the issue.
how to add link issue to #1 automaticaly with (eg) cz ch ?
I have search #396 but I can't understand how to do it.
Possible Solution
No response
Additional context
No response
Additional context
No response
You can check the documentation here. https://commitizen-tools.github.io/commitizen/customization/#custom-changelog-generator.
You'll probably need to change the changelog_hook inside it
def changelog_hook(self, full_changelog: str, partial_changelog: Optional[str]) -> str:
"""Executed at the end of the changelog generation
full_changelog: it's the output about to being written into the file
partial_changelog: it's the new stuff, this is useful to send slack messages or
similar
Return:
the new updated full_changelog
"""
if partial_changelog:
chat.room("#committers").notify(partial_changelog)
if full_changelog:
compliance.send(full_changelog)
full_changelog.replace(' fix ', ' **fix** ')
return full_changelog
In my local it's not possible because of dependency conflict on module chat (and this module is very big)
So my hope is from github/gitlab cicd.
When I change tool.commitizen.name to (eg:)cz_latihan, it get error on cicd :(
the error is Try running 'pip install cz_latihan'
I hope the default of cicd is creating a link to issue(s).
Do you mean the chat we use in the example? I think that is not needed if you're to customize changelog. That was just an example of how to integrate it with chat.
Since commitizen v3 the plugin system has greatly improved. The original question has been answered: create a custom commitizen package.
https://commitizen-tools.github.io/commitizen/customization/#custom-changelog-generator
Feel free to open a new issue