-
-
Notifications
You must be signed in to change notification settings - Fork 297
Changelog missing body and footer information #745
-
Hello,
Commitizen is a great tool thanks for creating it. I have a question related to creating a changelog. I would like to have the information enter into the "body" and "footer" prompts added to our changelog file. Is there a way to do that?
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
There's currently no way to add body
and footer
. Because there's no standard as of how to parse or what to parse. If you use Conventional Commits, only the BREAKING CHANGE:
content in the body will be parsed.
In order to parse more information from the body/footer, you could implement a custom commitizen, see: https://commitizen-tools.github.io/commitizen/customization/#custom-changelog-generator
For example, this cz rule will include the commit body:
from commitizen.cz.base import BaseCommitizen from commitizen import git class NewCommitizen(BaseCommitizen): def changelog_message_builder_hook(self, parsed_message: dict, commit: git.GitCommit) -> dict: m = parsed_message["message"] body = commit.body parsed_message["message"] = f"{m}\n{body}" return parsed_message
You can easily bootstrap a new commitizen rile by using the template:
https://github.com/commitizen-tools/commitizen_cz_template
Regards
Beta Was this translation helpful? Give feedback.