-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathcliff.toml
More file actions
89 lines (81 loc) · 3.97 KB
/
cliff.toml
File metadata and controls
89 lines (81 loc) · 3.97 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
# GitHub integration is activated in CI via GITHUB_REPO env var (set in prepare_release.yml).
# For local use (just changelog-preview / just release-notes), no token is needed.
# [remote.github] owner/repo can also be set here to enable local GitHub-enriched output
# when GITHUB_TOKEN is available, but it is omitted to keep local commands offline-friendly.
[changelog]
header = """# CHANGELOG
All notable unreleased changes to this project will be documented in this file.
For released versions, see the [Releases](https://github.com/mirumee/ariadne/releases) page.
"""
# Template produces two zones:
# 1. Summary sections – grouped, emoji-prefixed, breaking changes first (CHANGELOG.md / release body top)
# 2. What's Changed – flat list of every commit with contributor @mentions and PR links (release body only)
body = """
{% if version -%}
## {{ version }} ({{ timestamp | date(format="%Y-%m-%d") }})
{% else -%}
## Unreleased
{% endif -%}
{% set breaking_commits = commits | filter(attribute="breaking", value=true) -%}
{% if breaking_commits %}
### ⚠️ Breaking Changes
{% for commit in breaking_commits -%}
- **{{ commit.message | upper_first | trim }}**{% if commit.body %}
{{ commit.body | trim | indent(prefix=" ") }}
{% endif %}
{% endfor %}
{%- endif %}
{%- for group, commits in commits | group_by(attribute="group") -%}
{%- set non_breaking = commits | filter(attribute="breaking", value=false) -%}
{%- if non_breaking and group != "_misc" %}
### {{ group }}
{% for commit in non_breaking -%}
- {{ commit.message | upper_first | trim }}{% if commit.remote.username %} (by @{{ commit.remote.username }}{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/mirumee/ariadne/pull/{{ commit.remote.pr_number }}){% endif %}){% endif %}
{% endfor %}
{%- endif -%}
{% endfor %}
{% if version %}
## What's Changed
{% for commit in commits -%}
* {{ commit.message | upper_first | trim }}{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/mirumee/ariadne/pull/{{ commit.remote.pr_number }}){% endif %}
{% endfor %}
{%- if github.contributors is defined -%}
{%- set new_contributors = github.contributors | filter(attribute="is_first_time", value=true) -%}
{%- if new_contributors | length != 0 %}
### New Contributors
{% for contributor in new_contributors -%}
* @{{ contributor.username }} made their first contribution{% if contributor.pr_number %} in [#{{ contributor.pr_number }}](https://github.com/mirumee/ariadne/pull/{{ contributor.pr_number }}){% endif %}
{% endfor %}
{%- endif -%}
{%- endif %}
**Full Changelog**: https://github.com/mirumee/ariadne/compare/{{ previous.version }}...{{ version }}
{% endif -%}
"""
trim = true
footer = ""
[git]
conventional_commits = true
filter_unconventional = true
split_commits = false
protect_breaking_commits = false
# Keep all conventional commits (including chore/type/style) so they appear in "What's Changed".
# Non-conventional commits (e.g. "Benchmark results for 3.14") are removed by filter_unconventional.
filter_commits = false
sort_commits = "oldest"
# Only include stable release tags (no .rc, .dev, .b, .beta, .alpha suffixes)
tag_pattern = "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$"
# Skip pre-release tags – their commits are folded into the next stable release
skip_tags = "\\.(rc|dev)[0-9]*$"
ignore_tags = "\\.(b|beta|alpha)[0-9]*$"
commit_parsers = [
{ message = "^feat", group = "✨ New Features" },
{ message = "^fix", group = "🐛 Bug Fixes" },
{ message = "^perf", group = "⚡ Performance" },
{ message = "^refactor", group = "♻️ Refactoring" },
{ message = "^docs?", group = "📚 Documentation" },
{ message = "^build", group = "🛠️ Build System" },
{ message = "^ci", group = "👷 CI/CD" },
{ message = "^test", group = "🧪 Testing" },
# Grouped as _misc so they appear in "What's Changed" but are hidden from the summary sections
{ message = ".*", group = "_misc" },
]