feat: add changelog_ignore_body customization · commitizen-tools/commitizen@fcf4cc2
@@ -86,6 +86,7 @@ def generate_tree_from_commits(
8686change_type_map: Optional[Dict[str, str]] = None,
8787changelog_message_builder_hook: Optional[Callable] = None,
8888merge_prerelease: bool = False,
89+changelog_ignore_body: bool = False,
8990) -> Iterable[Dict]:
9091pat = re.compile(changelog_pattern)
9192map_pat = re.compile(commit_parser, re.MULTILINE)
@@ -143,6 +144,8 @@ def generate_tree_from_commits(
143144changes[change_type].append(parsed_message)
144145145146# Process body from commit message
147+if changelog_ignore_body:
148+continue
146149body_parts = commit.body.split("\n\n")
147150for body_part in body_parts:
148151message_body = body_map_pat.match(body_part)