bugfix: allow commits not compliant with conventional commits in changelog generation
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user