Skip to content

Commit 8f33664

Browse files
committed
fix: improve git-cliff configuration for better changelog formatting
- Simplify preprocessor to just remove issue number prefix - Use only first line of commit message in changelog - Remove upper_first to preserve conventional commit format
1 parent b337d84 commit 8f33664

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cliff.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ body = """
2222
{% for group, commits in commits | group_by(attribute="group") %}
2323
### {{ group | striptags | trim | upper_first }}
2424
{% for commit in commits %}
25-
- {{ commit.message | upper_first }}
25+
- {{ commit.message | split(pat="\n") | first | trim }}
2626
{% endfor %}
2727
{% endfor %}\n
2828
"""
@@ -46,7 +46,7 @@ split_commits = false
4646
# Regex for preprocessing commit messages
4747
commit_preprocessors = [
4848
# Transform "#123 type: description" to "type: description (#123)"
49-
{ pattern = '^#(\d+)\s+(.+)$', replace = "${2} (#${1})" },
49+
{ pattern = '^#(\d+)\s+', replace = "" },
5050
]
5151

5252
# Regex for parsing commit messages

0 commit comments

Comments
 (0)