-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliff.toml
More file actions
100 lines (84 loc) · 2.98 KB
/
cliff.toml
File metadata and controls
100 lines (84 loc) · 2.98 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
98
99
100
# git-cliff configuration
# https://git-cliff.org/docs/configuration
[changelog]
# Changelog header
header = """
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
"""
# Template for the changelog body
body = """
{%- macro remote_url() -%}
https://github.com/marcelocra/devmagic
{%- endmacro -%}
{% if version -%}
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else -%}
## [Unreleased]
{% endif -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}
{%- endfor %}
{% endfor %}
"""
# Template for the changelog footer
footer = """
{%- macro remote_url() -%}
https://github.com/marcelocra/devmagic
{%- endmacro -%}
{% for release in releases -%}
{% if release.version -%}
{% if release.previous.version -%}
[{{ release.version | trim_start_matches(pat="v") }}]: {{ self::remote_url() }}/compare/{{ release.previous.version }}...{{ release.version }}
{% else -%}
[{{ release.version | trim_start_matches(pat="v") }}]: {{ self::remote_url() }}/releases/tag/{{ release.version }}
{% endif -%}
{% else -%}
{% if release.previous.version -%}
[unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}...HEAD
{% endif -%}
{% endif -%}
{% endfor %}
"""
# Remove leading and trailing whitespace
trim = true
[git]
# Parse conventional commits
conventional_commits = true
filter_unconventional = true
split_commits = false
# Skip tags to preserve manually curated history
skip_tags = "v0\\.1\\.0|v0\\.2\\.0|v0\\.2\\.1"
# Commit parsers for grouping
commit_parsers = [
# Skip automated changelog update commits to prevent recursive entries
{ message = "(?i)^docs.*(?:update changelog|\\[skip ci\\])", skip = true },
# Skip release preparation commits
{ message = "^chore\\(release\\)", skip = true },
# Skip dependency update commits from Dependabot
{ message = "^chore\\(deps\\)", skip = true },
# Skip all CI-related commits
{ message = "^ci", skip = true },
{ message = "^feat", group = "Added" },
{ message = "^fix", group = "Fixed" },
{ message = "^doc", group = "Documentation" },
{ message = "^docs", group = "Documentation" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Changed" },
{ message = "^style", group = "Changed" },
{ message = "^test", group = "Changed" },
{ message = "^chore", group = "Changed" },
{ message = "^build", group = "Changed" },
{ body = ".*security", group = "Security" },
{ message = "^revert", group = "Removed" },
]
# Protect breaking changes from being skipped
protect_breaking_commits = false
# Filter out commits by pattern
filter_commits = false
# Sort commits by newest
sort_commits = "newest"