-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliff.toml
More file actions
134 lines (106 loc) · 4.68 KB
/
cliff.toml
File metadata and controls
134 lines (106 loc) · 4.68 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# ==============================================================================
# cliff.toml — cpp-gen
# ==============================================================================
# git-cliff configuration for automatic CHANGELOG.md generation
# from commits following the Conventional Commits convention.
#
# Documentation: https://git-cliff.org/docs/configuration
#
# Usage:
# git-cliff --output CHANGELOG.md → generates full changelog
# git-cliff --latest --output CHANGELOG.md → updates only the latest release
# make changelog → shortcut via Makefile
# ==============================================================================
[changelog]
# CHANGELOG header template (rendered once at the top of the file)
header = """
# Changelog
Todas as mudanças notáveis neste projeto estão documentadas aqui.
O formato segue [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/)
e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR/).
"""
# Template for each release section (rendered per tag)
# Uses the Tera template language (similar to Jinja2)
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] — {{ timestamp | date(format="%d/%m/%Y") }}
{% else %}\
## [Não lançado]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group }}
{% for commit in commits %}
- {% if commit.scope %}**{{ commit.scope }}:** {% endif %}\
{{ commit.message | upper_first }}\
{% if commit.breaking %} ⚠️ **BREAKING**{% endif %} \
([`{{ commit.id | truncate(length=7, end="") }}`]({{ commit.id }}))\
{% endfor %}
{% endfor %}\n
"""
# CHANGELOG footer (rendered once at the end)
footer = """
---
*Gerado automaticamente por [git-cliff](https://git-cliff.org)*
"""
# Removes extra whitespace from the output
trim = true
# ==============================================================================
# Commit parser configuration
# ==============================================================================
[git]
# Interprets commit messages as Conventional Commits
conventional_commits = true
# Ignores commits that do not follow the Conventional Commits convention
filter_unconventional = true
# Splits the commit body into separate paragraphs
split_commits = false
# Sorts commits within each group by date
sort_commits = "oldest"
# Filters tags that do not follow SemVer (e.g.: "latest", "stable")
tag_pattern = "v[0-9]+\\.[0-9]+\\.[0-9]+"
# Ignores pre-release tags in the standard changelog
# (uncomment to include alphas/betas)
# skip_tags = "v.+-(alpha|beta|rc).*"
# Processes issue and PR links in commit messages
link_parsers = [
{ pattern = "#(\\d+)", href = "https://github.com/SEU_USER/cpp-gen/issues/$1", text = "#$1" },
{ pattern = "RFC(\\d+)", href = "https://tools.ietf.org/html/rfc$1", text = "RFC$1" },
]
# Commit filters — excludes maintenance commits from the CHANGELOG
commit_filters = [
{ field = "message", pattern = "^(chore|ci|style|test)\\(", negate = false, group = "🔧 Manutenção" },
{ field = "message", pattern = "Merge (pull request|branch)", negate = true },
{ field = "message", pattern = "^wip:", negate = true },
]
# Pre-processing of commit messages before grouping
commit_preprocessors = [
# Removes the type and scope prefix to display only the description
# e.g.: "feat(tui): add layout selector" → "add layout selector"
{ pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](https://github.com/SEU_USER/cpp-gen/issues/${1}))" },
]
# ==============================================================================
# Conventional Commits type → CHANGELOG group mapping
# ==============================================================================
commit_parsers = [
# Breaking changes (type with ! or BREAKING CHANGE in footer)
{ message = "^.*!\\(.*\\):", group = "💥 Breaking Changes" },
{ body = ".*BREAKING CHANGE.*", group = "💥 Breaking Changes" },
# New features
{ message = "^feat", group = "⚡ Novas Funcionalidades" },
# Bug fixes
{ message = "^fix", group = "🐛 Correções" },
# Performance improvements
{ message = "^perf", group = "🚀 Performance" },
# Refactorings without behavior change
{ message = "^refactor", group = "♻️ Refatorações" },
# Documentation
{ message = "^docs", group = "📚 Documentação" },
# Tests
{ message = "^test", group = "🧪 Testes", skip = true },
# CI/CD
{ message = "^ci", group = "👷 CI/CD", skip = true },
# Chores and maintenance — excluded from the public CHANGELOG
{ message = "^chore", skip = true },
{ message = "^style", skip = true },
{ message = "^build", skip = true },
]