1 | # configuration for https://github.com/orhun/git-cliff
|
2 |
|
3 | [changelog]
|
4 | # changelog header
|
5 | header = """
|
6 | # Changelog
|
7 |
|
8 | All notable changes to this project will be documented in this file.
|
9 |
|
10 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
11 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
12 |
|
13 | """
|
14 | # template for the changelog body
|
15 | # https://keats.github.io/tera/docs/#introduction
|
16 | # note that the - before / after the % controls whether whitespace is rendered between each line.
|
17 | # Getting this right so that the markdown renders with the correct number of lines between headings
|
18 | # code fences and list items is pretty finicky. Note also that the 4 backticks in the commit macro
|
19 | # is intentional as this escapes any backticks in the commit body.
|
20 | body = """
|
21 |
|
22 | {% if not version %}
|
23 | ## [Unreleased]
|
24 | {% else %}
|
25 | ## [{{ version }}](https://git.meli-email.org/meli/meli/releases/tag/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
|
26 | {% endif %}
|
27 | {% macro commit(commit) -%}
|
28 | - [{{ 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 | upper_first }}{% endmacro -%}
|
29 | {% for group, commits in commits | group_by(attribute="group") %}
|
30 |
|
31 | ### {{ group | striptags | trim | upper_first }}
|
32 | {% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %}
|
33 | {{ self::commit(commit=commit) }}
|
34 | {%- endfor -%}
|
35 | {% for commit in commits %}
|
36 | {%- if not commit.scope %}
|
37 | {{ self::commit(commit=commit) }}
|
38 | {%- endif -%}
|
39 | {%- endfor -%}
|
40 | {%- endfor %}
|
41 | """
|
42 |
|
43 | # remove the leading and trailing whitespace from the template
|
44 | trim = true
|
45 | # changelog footer
|
46 | footer = """
|
47 |
|
48 |
|
49 | <!-- generated by git-cliff <https://git-cliff.org> -->
|
50 | """
|
51 |
|
52 | [git]
|
53 | # parse the commits based on https://www.conventionalcommits.org
|
54 | conventional_commits = true
|
55 | # filter out the commits that are not conventional
|
56 | filter_unconventional = false
|
57 | # process each line of a commit as an individual commit
|
58 | split_commits = false
|
59 | # regex for preprocessing the commit messages
|
60 | commit_preprocessors = [
|
61 | { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://git.meli-email.org/meli/meli/issues/${2}))" },
|
62 | ]
|
63 | # regex for parsing and grouping commits
|
64 | commit_parsers = [
|
65 | { message = "^feat", group = "<!-- 00 -->Added" },
|
66 | { message = "^[aA]dd", group = "<!-- 00 -->Added" },
|
67 | { message = "[fF]ix", group = "<!-- 01 -->Bug Fixes" },
|
68 | { message = "[rR]efactor", group = "<!-- 02 -->Refactoring" },
|
69 | { message = "[mM]ove", group = "<!-- 02 -->Refactoring" },
|
70 | { message = "[rR]emove", group = "<!-- 02 -->Refactoring" },
|
71 | { message = "^refactor", group = "<!-- 02 -->Refactoring" },
|
72 | { message = "^[^.]*.rs:", group = "<!-- 02 -->Refactoring" },
|
73 | { message = "^meli", group = "<!-- 07 -->Miscellaneous Tasks" },
|
74 | { message = "^melib", group = "<!-- 07 -->Miscellaneous Tasks" },
|
75 | { message = "^imap", group = "<!-- 07 -->Miscellaneous Tasks" },
|
76 | { message = "^jmap", group = "<!-- 07 -->Miscellaneous Tasks" },
|
77 | { message = "^notmuch", group = "<!-- 07 -->Miscellaneous Tasks" },
|
78 | { message = "^mbox", group = "<!-- 07 -->Miscellaneous Tasks" },
|
79 | { message = "^smtp", group = "<!-- 07 -->Miscellaneous Tasks" },
|
80 | { message = "^mbox", group = "<!-- 07 -->Miscellaneous Tasks" },
|
81 | { message = "^doc", group = "<!-- 03 -->Documentation" },
|
82 | { message = "[mM]anual", group = "<!-- 03 -->Documentation" },
|
83 | { message = "[mM]anpage", group = "<!-- 03 -->Documentation" },
|
84 | { message = "[rR]eadme", group = "<!-- 03 -->Documentation" },
|
85 | { message = "^perf", group = "<!-- 04 -->Performance" },
|
86 | { message = "^style", group = "<!-- 05 -->Styling" },
|
87 | { message = "^test", group = "<!-- 06 -->Testing" },
|
88 | { message = "^debian", group = "<!-- 06 -->Packaging" },
|
89 | { message = "^mail/view", group = "<!-- 02 -->Changes" },
|
90 | { message = "^view", group = "<!-- 02 -->Changes" },
|
91 | { message = "^utilities", group = "<!-- 02 -->Changes" },
|
92 | { message = "^mail", group = "<!-- 02 -->Changes" },
|
93 | { message = "^listing", group = "<!-- 02 -->Changes" },
|
94 | { message = "^terminal", group = "<!-- 02 -->Changes" },
|
95 | { message = "^types", group = "<!-- 02 -->Changes" },
|
96 | { message = "^conf", group = "<!-- 02 -->Changes" },
|
97 | { message = "^chore\\(release\\): prepare for", skip = true },
|
98 | { message = "^chore\\(pr\\)", skip = true },
|
99 | { message = "^chore\\(pull\\)", skip = true },
|
100 | { message = "^chore\\(deps\\)", skip = true },
|
101 | { message = "^chore\\(changelog\\)", skip = true },
|
102 | { message = "^[cC]hore", group = "<!-- 07 -->Miscellaneous Tasks" },
|
103 | { message = "^scripts", group = "<!-- 07 -->Miscellaneous Tasks" },
|
104 | { body = ".*security", group = "<!-- 08 -->Security" },
|
105 | { message = "^build", group = "<!-- 09 -->Build" },
|
106 | { message = "^ci", group = "<!-- 10 -->Continuous Integration" },
|
107 | { message = "^revert", group = "<!-- 11 -->Reverted Commits" },
|
108 | { message = ".*", group = "<!-- 07 -->Miscellaneous Tasks" },
|
109 | ]
|
110 | # protect breaking changes from being skipped due to matching a skipping commit_parser
|
111 | protect_breaking_commits = false
|
112 | # filter out the commits that are not matched by commit parsers
|
113 | filter_commits = false
|
114 | # glob pattern for matching git tags
|
115 | tag_pattern = "v[0-9]+|alpha-[0-9]+"
|
116 | # regex for ignoring tags
|
117 | ignore_tags = "v[^-]+-rc[.]?[0-9]+"
|
118 | # regex for skipping tags
|
119 | #skip_tags = "alpha"
|
120 | # sort the tags topologically
|
121 | topo_order = false
|
122 | # sort the commits inside sections by oldest/newest order
|
123 | sort_commits = "oldest"
|