-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliff.toml
More file actions
97 lines (89 loc) · 4.16 KB
/
cliff.toml
File metadata and controls
97 lines (89 loc) · 4.16 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# yaml-language-server: $schema=https://raw.githubusercontent.com/MarcoIeni/release-plz/refs/heads/main/.schema/latest.json
[changelog]
render_always = true
use_branch_tags = true
header = """
# Changelog\n
All notable changes to this project will be documented in this file.
"""
body = """
{%- set mapCommitsByDate = commits | unique(attribute="message") | filter(attribute="merge_commit", value=false) | group_by(attribute="extra.date") -%}
{%- set_global listCommitsOrderedByDate = [] -%}
{%- for commit, ignored in mapCommitsByDate -%}
{%- set_global listCommitsOrderedByDate = listCommitsOrderedByDate | concat(with=commit) -%}
{% endfor %}
{% for commits in listCommitsOrderedByDate | reverse %}
## {{ commits }}
{% for group, commits in mapCommitsByDate[commits] | group_by(attribute="group") %}
### {{ group | striptags | trim }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
\\[[{{ commit.id | truncate(length=8, end="") }}](<COMMIT_URL>/{{ commit.id }})\\] {{ commit.message | split(pat="\n") | first | trim }}\
{% endfor %}
{% endfor %}
{% endfor %}
"""
footer = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing s
trim = true
# postprocessors
postprocessors = [
{ pattern = '<REPO_URL>', replace = "https://github.com/silveiralexf/.dotfiles" },
{ pattern = '<COMMIT_URL>', replace = "https://github.com/silveiralexf/.dotfiles/commit" },
{ pattern = "@gmail.com", replace = "" },
]
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages (normalize old-style commits to reduce conventional-format warnings)
commit_preprocessors = [
# Normalize legacy [FIX]/[UPDATE] and similar prefixes so they pass conventional-commit check
{ pattern = "^\\[FIX\\]\\s*", replace = "fix: " },
{ pattern = "^\\[UPDATE\\]\\s*", replace = "chore: " },
{ pattern = "^Merge pull request", replace = "chore: Merge pull request" },
{ pattern = "^Merge branch", replace = "chore: Merge branch" },
{ pattern = "^[Uu]pdates?(.*)$", replace = "chore: updates$1" },
{ pattern = "^Updated\\s", replace = "chore: Updated " },
{ pattern = "^Added\\s", replace = "chore: Added " },
{ pattern = "^Add\\s", replace = "feat: Add " },
{ pattern = "^Fixed\\s", replace = "fix: Fixed " },
{ pattern = "^Improved\\s", replace = "chore: Improved " },
{ pattern = "^Small\\s", replace = "chore: Small " },
{ pattern = "^Minor\\s", replace = "chore: Minor " },
{ pattern = "^remove\\s", replace = "chore: remove " },
{ pattern = "^[Rr]emove\\s", replace = "chore: Remove " },
{ pattern = "^[Ii]nitial\\s", replace = "chore: Initial " },
# Original preprocessors
{ pattern = " +", replace = " " },
{ pattern = "https://github.com/.*/issues/([0-9]+)", replace = "[Issue #${1}]" },
{ pattern = "Former-commit-id:.*", replace = "" },
{ pattern = "\n\n$", replace = "" },
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^hack", skip = true },
{ message = ".*deps.*", group = "<!-- 10 -->📦 Dependencies" },
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 7 -->🔨 Fixes" },
{ message = "^refactor", group = "<!-- 2 --> 🏭 Refactor" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^style|^lint", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
{ message = "^chore|^ci|\\(ci\\)", group = "<!-- 8 -->⚙️ Chores" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = true
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "newest"