-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcliff.toml
63 lines (59 loc) · 2.5 KB
/
cliff.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
[changelog]
trim = true
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.\n
"""
footer = """
<!-- generated by git-cliff -->
"""
body = """
## Release notes 📋
{%- for commit in commits | sort(attribute="group") %}
{%- if commit.group -%}
{% else -%}
- **{{ commit.scope | striptags | trim }}:** \
{{ commit.message | upper_first }}\
{%- if commit.message is not matching(".*\\s+\\(#\\d+\\)\\s*$") %} ([`{{ commit.id | truncate(length=10, end="") }}`]($REPO/commit/{{ commit.id }})){%- endif -%}
{% endif -%}
{% endfor -%}
{% for group, commits in commits | filter(attribute="scope") | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits | sort(attribute="scope") %}
- **{{ commit.scope | striptags | trim }}:** \
{{ commit.message | upper_first }}\
{%- if commit.message is not matching(".*\\s+\\(#\\d+\\)\\s*$") %} ([`{{ commit.id | truncate(length=10, end="") }}`]($REPO/commit/{{ commit.id }})){%- endif -%}
{%- endfor -%}
{% raw %}\n{% endraw %}\
{% endfor %}\n
"""
postprocessors = [
{ pattern = '\b((?i)(?:EPI|KAM|MAUI|MDEV|NASS|NOTAM|SAV|TAM3|TAMOC|TAN|TAV|VIT|WAITM)-[1-9][0-9]*)\b', replace = "[$1](https://linear.app/bes/issue/$1)" }, # linear
{ pattern = '\(#(\d+)\)', replace = "([#$1]($$REPO/pull/$1))"}, # github
{ pattern = '\$REPO', replace = "https://github.com/beyondessential/tamanu" }, # replace repository URL
]
[git]
conventional_commits = true
filter_unconventional = true
split_commits = true
protect_breaking_commits = true
filter_commits = true
tag_pattern = "v[0-9].*"
sort_commits = "oldest"
commit_parsers = [
{ message = "^feat", group = "Features ⭐" },
{ message = "^fix", group = "Bugfixes 🐛" },
{ message = "^tweak", group = "Tweaks ⚖️" },
{ message = "^config", group = "Configuration ⚙️" },
{ message = "^db", group = "Database 📊" },
{ message = "^doc", group = "Documentation 📚" },
{ message = "^perf", group = "Performance 🌊" },
{ message = "^refactor", group = "Refactors 🛠️" },
{ message = "^test", group = "Testing 🧪" },
{ message = "^deps", group = "Dependencies 📦" },
{ message = "^repo", group = "Repo 📖" },
{ message = "^(chore|ci|draft|fmt|merge|release|style|wip)", skip = true },
{ body = ".*security", group = "Security ⚠️" },
{ message = "^revert", group = "Revert ⏪" },
]