1+ # git-cliff ~ configuration file
2+ # https://git-cliff.org/docs/configuration
3+
4+ [changelog ]
5+ # template for the changelog header
6+ header = """
7+ # Changelog\n
8+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
9+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
10+ """
11+ # template for the changelog body
12+ # https://keats.github.io/tera/docs/#introduction
13+ body = """
14+ {%- macro remote_url() -%}
15+ https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
16+ {%- endmacro -%}
17+
18+ {% if version -%}
19+ ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
20+ {% else -%}
21+ ## [Unreleased]
22+ {% endif -%}
23+
24+ {% for group, commits in commits | group_by(attribute="group") %}
25+ ### {{ group | upper_first }}
26+ {%- for commit in commits %}
27+ - {{ commit.message | split(pat="\n ") | first | upper_first | trim }}\
28+ {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}
29+ {% if commit.remote.pr_number %} in \
30+ [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
31+ {%- endif -%}
32+ {% endfor %}
33+ {% endfor %}
34+
35+ {%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
36+ ## New Contributors
37+ {%- endif -%}
38+
39+ {% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
40+ * @{{ contributor.username }} made their first contribution
41+ {%- if contributor.pr_number %} in \
42+ [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
43+ {%- endif %}
44+ {%- endfor %}\n
45+ """
46+ # template for the changelog footer
47+ footer = """
48+ \n
49+ Full changelog is available at \
50+ [{{ remote.github.owner }}/{{ remote.github.repo }}]/{{release.version}}\n
51+ Developed by Development Gateway
52+ """
53+ # remove the leading and trailing whitespace from the templates
54+ trim = true
55+
56+ [git ]
57+ # parse the commits based on https://www.conventionalcommits.org
58+ conventional_commits = true
59+ # filter out the commits that are not conventional
60+ filter_unconventional = false
61+ # regex for preprocessing the commit messages
62+ commit_preprocessors = [
63+ # remove issue numbers from commits
64+ { pattern = ' \((\w+\s)?#([0-9]+)\)' , replace = " " },
65+ ]
66+ # regex for parsing and grouping commits
67+ commit_parsers = [
68+ { message = " ^[a|A]dd" , group = " Added" },
69+ { message = " ^[s|S]upport" , group = " Added" },
70+ { message = " ^[r|R]emove" , group = " Removed" },
71+ { message = " ^.*: add" , group = " Added" },
72+ { message = " ^.*: support" , group = " Added" },
73+ { message = " ^.*: remove" , group = " Removed" },
74+ { message = " ^.*: delete" , group = " Removed" },
75+ { message = " ^test" , group = " Fixed" },
76+ { message = " ^fix" , group = " Fixed" },
77+ { message = " ^.*: fix" , group = " Fixed" },
78+ { message = " ^.*" , group = " Changed" },
79+
80+ ]
81+ # filter out the commits that are not matched by commit parsers
82+ filter_commits = false
83+ # sort the tags topologically
84+ topo_order = false
85+ # sort the commits inside sections by oldest/newest order
86+ sort_commits = " newest"
87+
88+ [bump ]
89+ initial_tag = " v1.0.0"
0 commit comments