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 = """ - -""" [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 = "Breaking"}, + { message = "^feat", group = "Features"}, + { message = "^fix", group = "Bug Fixes"}, + { message = "^perf", group = "Performance"}, + { message = "^build", group = "Build System"}, + { message = "^vim-patch", group = "Vim patches"}, + { message = "^refactor", group = "Refactor" }, + { message = "^ci", group = "CI" }, + { message = "^test", group = "Testing" }, + { message = "^docs", group = "Documentation" }, + { message = "^revert", group = "Reverted Changes" }, + { message = ".*", group = "Other"}, ] # filter out the commits that are not matched by commit parsers filter_commits = true