From 3ff9f76a6c6866e09591c3f6179ec513efd24158 Mon Sep 17 00:00:00 2001 From: Jonathan Teran Carballo Date: Tue, 2 Jun 2026 21:38:18 -0300 Subject: [PATCH] bugfix: allow commits not compliant with conventional commits in changelog generation --- src/git_flow/changelog.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/git_flow/changelog.py b/src/git_flow/changelog.py index 3db172c..7cc5d51 100644 --- a/src/git_flow/changelog.py +++ b/src/git_flow/changelog.py @@ -28,11 +28,15 @@ class Changelog: message = Git("show", commit, patch=False, format="%s").firstline() email = Git("show", commit, patch=False, format="%ae").firstline() username = email[: email.index("@")] - index = message.index(":") - commit_type = message[:index] - commit_message = message[index + 1 :] + description = message - content += f"- **{commit_type}**: {commit_message} [[{username}](mailto:{email})] ({commit})\n" + if ":" in message: + index = message.index(":") + commit_type = message[:index] + commit_message = message[index + 1 :] + description = f"**{commit_type}**: {commit_message}" + + content += f"- {description} [[{username}](mailto:{email})] ({commit})\n" return content