1 | # configuration for https://github.com/orhun/git-cliff
|
2 |
|
3 | [remote.gitea]
|
4 | owner = "meli"
|
5 | repo = "meli"
|
6 |
|
7 | [changelog]
|
8 | # changelog header
|
9 | header = """
|
10 | # Changelog
|
11 |
|
12 | All notable changes to this project will be documented in this file.
|
13 |
|
14 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
15 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
16 |
|
17 | """
|
18 | # template for the changelog body
|
19 | # https://keats.github.io/tera/docs/#introduction
|
20 | # note that the - before / after the % controls whether whitespace is rendered between each line.
|
21 | # Getting this right so that the markdown renders with the correct number of lines between headings
|
22 | # code fences and list items is pretty finicky. Note also that the 4 backticks in the commit macro
|
23 | # is intentional as this escapes any backticks in the commit body.
|
24 | body = """
|
25 |
|
26 | {% if not version %}
|
27 | ## Unreleased
|
28 | {% else %}
|
29 | ## [{{ version }}]({{ "https://git.meli-email.org/meli/meli/releases/tag/" ~ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
|
30 | {% endif %}{% if get_env(name = "FRIENDS", default = "") != "" %}
|
31 | Contributors in alphabetical order:
|
32 |
|
33 | {{ get_env(name = "FRIENDS") }}
|
34 | {%- endif -%}{% if gitea and gitea.contributors %}{% for contributor in gitea.contributors | filter(attribute="is_first_time", value=true) %}
|
35 | * [@{{ contributor.username }}](https://git.meli-email.org/{{ contributor.username }}) made their first contribution in [#{{ contributor.pr_number }}]({{ "https://git.meli-email.org/meli/meli/pulls/" ~ contributor.pr_number }})
|
36 | {%- endfor -%}{%- endif -%}{% macro commit(commit) -%}
|
37 | - [**`{{ commit.id | truncate(length=8, end="") }}`**]({{ "https://git.meli-email.org/meli/meli/commit/" ~ commit.id }}) {% if commit.scope %}*({{commit.scope | lower }})* {% endif %}`{{ commit.message | split(pat="\n")| first }}`{% if commit.remote and commit.remote.pr_number and commit.remote.pr_title %} in PR [`#{{ commit.remote.pr_number }}` "{{ commit.remote.pr_title }}"]({{ "https://git.meli-email.org/meli/meli/pulls/" ~ commit.remote.pr_number }}){%- endif -%}{% endmacro -%}
|
38 | {% for group, commits in commits | group_by(attribute="group") %}
|
39 |
|
40 | ### {{ group | striptags | trim | upper_first }}
|
41 | {% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %}
|
42 | {{ self::commit(commit=commit) }}
|
43 | {%- endfor -%}
|
44 | {% for commit in commits %}
|
45 | {%- if not commit.scope %}
|
46 | {{ self::commit(commit=commit) }}
|
47 | {%- endif -%}
|
48 | {%- endfor -%}
|
49 | {%- endfor %}
|
50 | """
|
51 |
|
52 | # remove the leading and trailing whitespace from the template
|
53 | trim = true
|
54 | # changelog footer
|
55 | footer = """
|
56 |
|
57 |
|
58 | <!-- generated by git-cliff <https://git-cliff.org> -->
|
59 | """
|
60 |
|
61 | [git]
|
62 | # don't parse the commits based on https://www.conventionalcommits.org
|
63 | conventional_commits = false
|
64 | # filter out the commits that are not conventional
|
65 | filter_unconventional = false
|
66 | # process each line of a commit as an individual commit
|
67 | split_commits = false
|
68 | # regex for preprocessing the commit messages
|
69 | commit_preprocessors = [
|
70 | { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://git.meli-email.org/meli/meli/issues/${2}))" }, # Replace the issue number with the link
|
71 | { pattern = " +", replace = " "}, # Replace multiple spaces with a single space
|
72 | { pattern = "`[^`]+`", replace_command = "pandoc -f commonmark -t plain" },
|
73 | ]
|
74 | # regex for parsing and grouping commits
|
75 | commit_parsers = [
|
76 | { message = "^chore\\(changelog\\)", skip = true },
|
77 | { message = "^chore\\(deps\\)", skip = true },
|
78 | { message = "^chore\\(pull\\)", skip = true },
|
79 | { message = "^chore\\(pr\\)", skip = true },
|
80 | { message = "^chore\\(release\\): prepare for", skip = true },
|
81 | { message = "^CHANGELOG", skip = true },
|
82 | { message = "(?i)^revert", group = "<!-- 11 -->Reverted Commits" },
|
83 | { message = "^.github", group = "<!-- 10 -->Continuous Integration" },
|
84 | { message = "^.gitea", group = "<!-- 10 -->Continuous Integration" },
|
85 | { message = "(?i)^ci", group = "<!-- 10 -->Continuous Integration" },
|
86 | { message = "^build", group = "<!-- 09 -->Build" },
|
87 | { body = ".*security", group = "<!-- 08 -->Security" },
|
88 | { message = "^scripts", group = "<!-- 07 -->Miscellaneous Tasks" },
|
89 | { message = '(?i)^chore', group = "<!-- 07 -->Miscellaneous Tasks" },
|
90 | { message = "^debian", group = "<!-- 06 -->Packaging" },
|
91 | { message = "^test", group = "<!-- 06 -->Testing" },
|
92 | { message = "^style", group = "<!-- 05 -->Styling" },
|
93 | { message = "^perf", group = "<!-- 04 -->Performance" },
|
94 | { message = "(?i)readme", group = "<!-- 03 -->Documentation" },
|
95 | { message = "(?i)anpage", group = "<!-- 03 -->Documentation" },
|
96 | { message = "(?i)anual", group = "<!-- 03 -->Documentation" },
|
97 | { message = "meli.[17]", group = "<!-- 03 -->Documentation" },
|
98 | { message = "meli.conf.5", group = "<!-- 03 -->Documentation" },
|
99 | { message = "meli-themes.5", group = "<!-- 03 -->Documentation" },
|
100 | { message = "README.md", group = "<!-- 03 -->Documentation" },
|
101 | { message = "BUILD.md", group = "<!-- 03 -->Documentation" },
|
102 | { message = "DEVELOPMENT.md", group = "<!-- 03 -->Documentation" },
|
103 | { message = "^doc", group = "<!-- 03 -->Documentation" },
|
104 | { message = "^[^.]*.rs:", group = "<!-- 02 -->Refactoring" },
|
105 | { message = '(?i)^refactor\b', group = "<!-- 02 -->Refactoring" },
|
106 | { message = '(?i)lints?\b', group = "<!-- 02 -->Refactoring" },
|
107 | { message = '(?i)move\b', group = "<!-- 02 -->Refactoring" },
|
108 | { message = '(?i)replace\b', group = "<!-- 02 -->Refactoring" },
|
109 | { message = '(?i)remove\b', group = "<!-- 02 -->Refactoring" },
|
110 | { message = '(?i)refactor\b', group = "<!-- 02 -->Refactoring" },
|
111 | { message = '(?i)rename\b', group = "<!-- 02 -->Refactoring" },
|
112 | { message = '(?i)formatting\b', group = "<!-- 02 -->Refactoring" },
|
113 | { message = '(?i)cleanups?\b', group = "<!-- 02 -->Refactoring" },
|
114 | { message = '(?i)fix\b', group = "<!-- 01 -->Bug Fixes" },
|
115 | { message = '(?i)fixups?\b', group = "<!-- 01 -->Bug Fixes" },
|
116 | { message = "(?i)implement", group = "<!-- 00 -->Added" },
|
117 | { message = '(?i)add\b', group = "<!-- 00 -->Added" },
|
118 | { message = '(?i)^update\b', group = "<!-- 02 -->Changes" },
|
119 | { message = '(?i)\bdependency\b', group = "<!-- 02 -->Changes" },
|
120 | { message = "^feat", group = "<!-- 00 -->Added" },
|
121 | { message = '(?i)retry\b', group = "<!-- 02 -->Changes" },
|
122 | { message = "^conf", group = "<!-- 02 -->Changes" },
|
123 | { message = "^contacts?", group = "<!-- 02 -->Changes" },
|
124 | { message = "^compos[ie]?", group = "<!-- 02 -->Changes" },
|
125 | { message = "^types", group = "<!-- 02 -->Changes" },
|
126 | { message = '(?i)^use', group = "<!-- 02 -->Changes" },
|
127 | { message = "^terminal", group = "<!-- 02 -->Changes" },
|
128 | { message = "^listing", group = "<!-- 02 -->Changes" },
|
129 | { message = "^mail", group = "<!-- 02 -->Changes" },
|
130 | { message = "^utilities", group = "<!-- 02 -->Changes" },
|
131 | { message = "^view", group = "<!-- 02 -->Changes" },
|
132 | { message = "^mail/view", group = "<!-- 02 -->Changes" },
|
133 | { message = "^backends?", group = "<!-- 02 -->Changes" },
|
134 | { message = "^commands?", group = "<!-- 02 -->Changes" },
|
135 | { message = "^actions?", group = "<!-- 02 -->Changes" },
|
136 | { message = "^log", group = "<!-- 02 -->Changes" },
|
137 | { message = "^pgp", group = "<!-- 02 -->Changes" },
|
138 | { message = "^gpgme", group = "<!-- 02 -->Changes" },
|
139 | { message = "^manage", group = "<!-- 02 -->Changes" },
|
140 | { message = "^smtp", group = "<!-- 02 -->Changes" },
|
141 | { message = "^mbox", group = "<!-- 02 -->Changes" },
|
142 | { message = "^jmap", group = "<!-- 02 -->Changes" },
|
143 | { message = "^imap", group = "<!-- 02 -->Changes" },
|
144 | { message = "^nntp", group = "<!-- 02 -->Changes" },
|
145 | { message = "^notmuch", group = "<!-- 02 -->Changes" },
|
146 | { message = "^melib", group = "<!-- 02 -->Changes" },
|
147 | { message = "^meli", group = "<!-- 02 -->Changes" },
|
148 | { message = "^accounts", group = "<!-- 02 -->Changes" },
|
149 | { message = "^embedded", group = "<!-- 02 -->Changes" },
|
150 | { message = "^jobs", group = "<!-- 02 -->Changes" },
|
151 | { message = ".*", group = "<!-- 07 -->Miscellaneous Tasks" },
|
152 | ]
|
153 | # protect breaking changes from being skipped due to matching a skipping commit_parser
|
154 | protect_breaking_commits = false
|
155 | # filter out the commits that are not matched by commit parsers
|
156 | filter_commits = false
|
157 | # glob pattern for matching git tags
|
158 | tag_pattern = "v[0-9]+|alpha-[0-9]+"
|
159 | # regex for ignoring tags
|
160 | ignore_tags = "v[^-]+-rc[.]?[0-9]+"
|
161 | # regex for skipping tags
|
162 | #skip_tags = "alpha"
|
163 | # sort the tags topologically
|
164 | topo_order = false
|
165 | # sort the commits inside sections by oldest/newest order
|
166 | sort_commits = "oldest"
|