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

Sign up
Appearance settings

Changelog missing body and footer information #745

Unanswered
jlanzarotta asked this question in Q&A
Discussion options

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,

MyCommitizen.txt

You must be logged in to vote

Replies: 1 comment

Comment options

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

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /