feat: add changelog_ignore_body customization · commitizen-tools/commitizen@fcf4cc2

@@ -86,6 +86,7 @@ def generate_tree_from_commits(

8686

change_type_map: Optional[Dict[str, str]] = None,

8787

changelog_message_builder_hook: Optional[Callable] = None,

8888

merge_prerelease: bool = False,

89+

changelog_ignore_body: bool = False,

8990

) -> Iterable[Dict]:

9091

pat = re.compile(changelog_pattern)

9192

map_pat = re.compile(commit_parser, re.MULTILINE)

@@ -143,6 +144,8 @@ def generate_tree_from_commits(

143144

changes[change_type].append(parsed_message)

144145145146

# Process body from commit message

147+

if changelog_ignore_body:

148+

continue

146149

body_parts = commit.body.split("\n\n")

147150

for body_part in body_parts:

148151

message_body = body_map_pat.match(body_part)