Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add link issue on changelog? #555

Closed
ftamhar opened this issue Aug 11, 2022 · 4 comments
Closed

How to add link issue on changelog? #555

ftamhar opened this issue Aug 11, 2022 · 4 comments

Comments

@ftamhar
Copy link

ftamhar commented Aug 11, 2022

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

@ftamhar ftamhar added the type: feature A new enhacement proposal label Aug 11, 2022
@Lee-W Lee-W added type: question and removed type: feature A new enhacement proposal labels Aug 14, 2022
@Lee-W
Copy link
Member

Lee-W commented Aug 14, 2022

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

@ftamhar
Copy link
Author

ftamhar commented Aug 15, 2022

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).

@Lee-W
Copy link
Member

Lee-W commented Aug 16, 2022

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.

@woile
Copy link
Member

woile commented Apr 28, 2023

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

@woile woile closed this as completed Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants