1- # git-cliff ~ default configuration file
1+ # git-cliff configuration file
22# https://git-cliff.org/docs/configuration
3- #
4- # Lines starting with "#" are comments.
5- # Configuration options are organized into tables and keys.
6- # See documentation for more information on available options.
7-
83
94[changelog ]
105
11- # changelog header
126header = """
13- # Changelog\n
14- All notable changes to this project will be documented in this file.\n
7+ # Changelog\n\n
158"""
169
17- # template for the changelog body
18- # https://keats.github.io/tera/docs/#introduction
1910body = """
2011{% if version %}\
21- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
12+ {% if previous.version %}\
13+ ## [{{ version | trim_start_matches(pat="v") }}](<REPO>/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
14+ {% else %}\
15+ ## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
16+ {% endif %}\
2217{% else %}\
2318 ## [unreleased]
2419{% endif %}\
2520{% for group, commits in commits | group_by(attribute="group") %}
26- ### {{ group | upper_first }}
21+ ### {{ group | striptags | trim }}
2722 {% for commit in commits %}
28- - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
23+ - [`{{ commit.id | truncate(length=7, end="") }}`](<REPO>/commit/{{ commit.id }}) \
24+ {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
25+ {% if commit.breaking %}**[breaking]** {% endif %}\
26+ {{ commit.message | split(pat="\n ") | first | upper_first | trim }}\
2927 {% endfor %}
3028{% endfor %}\n
3129"""
3230
33- # template for the changelog footer
34- footer = """
35- <!-- generated by git-cliff -->
36- """
31+ footer = " <!-- generated by git-cliff -->"
3732
38- # remove the leading and trailing s
33+ # remove the leading and trailing whitespace from the templates
3934trim = true
4035
4136# postprocessors
4237postprocessors = [
43- # { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff " }, # replace repository URL
38+ { pattern = ' <REPO>' , replace = " https://github.com/nyg/kraken-api-java " }
4439]
4540
4641
@@ -58,29 +53,24 @@ split_commits = false
5853# regex for preprocessing the commit messages
5954commit_preprocessors = [
6055 # Replace issue numbers
61- # { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
62- # Check spelling of the commit with https://github.com/crate-ci/typos
63- # If the spelling is incorrect, it will be automatically fixed.
64- # { pattern = '.*', replace_command = 'typos --write-changes -' },
56+ { pattern = ' \((\w+\s)?#([0-9]+)\)' , replace = " ([#${2}](<REPO>/issues/${2}))" },
57+ { pattern = ' #([0-9]+) ' , replace = " [#${1}](<REPO>/issues/${1}) " }
6558]
6659
6760# regex for parsing and grouping commits
6861commit_parsers = [
69- { message = " ^feat" , group = " Features" },
70- { message = " ^fix" , group = " Bug Fixes" },
71- { message = " ^doc" , group = " Documentation" },
72- { message = " ^perf" , group = " Performance" },
73- { message = " ^refactor" , group = " Refactor" },
74- { message = " ^style" , group = " Styling" },
75- { message = " ^test" , group = " Testing" },
76- { message = " ^chore\\ (release\\ ): prepare for" , skip = true },
77- { message = " ^chore\\ (deps\\ )" , skip = true },
78- { message = " ^chore\\ (pr\\ )" , skip = true },
79- { message = " ^chore\\ (pull\\ )" , skip = true },
80- { message = " ^(chore|ci)" , group = " Miscellaneous Tasks" },
81- { message = " ^revert" , group = " Revert" },
82- { message = " ^\\ [maven-release-plugin\\ ]" , skip = true },
83- { message = " .*" , group = " Other" },
62+ { message = " ^security" , group = " <!-- 0 -->🛡️ Security" },
63+ { message = " ^feat" , group = " <!-- 1 -->⛰️ Features" },
64+ { message = " ^fix" , group = " <!-- 2 -->🐛 Bug Fixes" },
65+ { message = " ^refactor" , group = " <!-- 3 -->🚜 Refactor" },
66+ { message = " ^doc" , group = " <!-- 4 -->📚 Documentation" },
67+ { message = " ^perf" , group = " <!-- 5 -->⚡ Performance" },
68+ { message = " ^style" , group = " <!-- 6 -->🎨 Styling" },
69+ { message = " ^test" , group = " <!-- 7 -->🧪 Testing" },
70+ { message = " ^chore\\ (release\\ ):" , skip = true },
71+ { message = " ^(chore|ci|build)" , group = " <!-- 8 -->⚙️ Miscellaneous" },
72+ { message = " ^revert" , group = " <!-- 9 -->◀️ Revert" },
73+ { message = " .*" , group = " Others" },
8474]
8575
8676# protect breaking changes from being skipped due to matching a skipping commit_parser
0 commit comments