aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/cliff.toml41
1 files changed, 20 insertions, 21 deletions
diff --git a/scripts/cliff.toml b/scripts/cliff.toml
index 3fc10e5d16..ac060b7796 100644
--- a/scripts/cliff.toml
+++ b/scripts/cliff.toml
@@ -1,4 +1,4 @@
-# configuration file for git-cliff (0.1.0)
+# configuration file for git-cliff
[changelog]
# changelog header
@@ -7,7 +7,8 @@ header = """
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
-# https://tera.netlify.app/docs/#introduction
+# https://github.com/Keats/tera
+# https://keats.github.io/tera/docs/
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
@@ -15,25 +16,21 @@ body = """
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
- ### {{ group | upper_first }}
- {% for commit in commits%}\
+ ### {{ group | striptags | upper_first }}
+ {% for commit in commits | sort(attribute="message")%}\
{% if not commit.scope %}\
- - {{ commit.message | upper_first }}
+ - {{ commit.message }}
{% endif %}\
{% endfor %}\
{% for group, commits in commits | group_by(attribute="scope") %}\
- {% for commit in commits %}\
- - **{{commit.scope}}**: {{ commit.message | upper_first }}
+ {% for commit in commits | sort(attribute="message") %}\
+ - **{{commit.scope}}**: {{ commit.message }}
{% endfor %}\
{% endfor %}
{% endfor %}\n
"""
# remove the leading and trailing whitespace from the template
trim = true
-# changelog footer
-footer = """
-<!-- generated by git-cliff -->
-"""
[git]
# parse the commits based on https://www.conventionalcommits.org
@@ -48,16 +45,18 @@ commit_preprocessors = [
]
# regex for parsing and grouping commits
commit_parsers = [
- { message = "!:", group = "Breaking"},
- { message = "^feat", group = "Features"},
- { message = "^fix", group = "Bug Fixes"},
- { message = "^doc", group = "Documentation"},
- { message = "^perf", group = "Performance"},
- { message = "^refactor", group = "Refactor"},
- { message = "^test", group = "Testing"},
- { message = "^chore", group = "Miscellaneous Tasks"},
- { message = "^build", group = "Build System"},
- { message = "^Revert", group = "Reverted Changes"},
+ { message = "!:", group = "<!-- 0 -->Breaking"},
+ { message = "^feat", group = "<!-- 1 -->Features"},
+ { message = "^fix", group = "<!-- 2 -->Bug Fixes"},
+ { message = "^perf", group = "<!-- 3 -->Performance"},
+ { message = "^build", group = "<!-- 4 -->Build System"},
+ { message = "^vim-patch", group = "<!-- 5 -->Vim patches"},
+ { message = "^refactor", group = "<!-- 6 -->Refactor" },
+ { message = "^ci", group = "<!-- 8 -->CI" },
+ { message = "^test", group = "<!-- 9 -->Testing" },
+ { message = "^docs", group = "<!-- 99 -->Documentation" },
+ { message = "^revert", group = "<!-- 999 -->Reverted Changes" },
+ { message = ".*", group = "<!-- 9999 -->Other"},
]
# filter out the commits that are not matched by commit parsers
filter_commits = true