Skip to content

Commit cca655a

Browse files
authored
Merge pull request #57 from peczenyj/chore/standardize-cliff-config
chore: standardize git-cliff config with sibling repos
2 parents 27d921e + 437ab95 commit cca655a

2 files changed

Lines changed: 49 additions & 34 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
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.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [Unreleased]
6+
7+
### Changed
8+
9+
- Standardize git-cliff configuration with sibling repositories
10+
511
## [0.2.1] - 2026-05-25
612

713
### Fixed

cliff.toml

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
# git-cliff ~ configuration file
22
# https://git-cliff.org/docs/configuration
3+
#
4+
# Generates a "Keep a Changelog"-style CHANGELOG.md from Conventional Commits.
5+
# Section order follows keepachangelog.com: Added, Changed, Deprecated,
6+
# Removed, Fixed, Security (Documentation is appended as an extra section).
7+
# The "<!-- N -->" prefixes on group names only control ordering; they are
8+
# stripped from the rendered headings via the `striptags` filter.
39

410
[changelog]
5-
# A Tera template to be rendered as the changelog's header.
6-
# See https://keats.github.io/tera/docs/#introduction
711
header = """
812
# Changelog\n
9-
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.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
13+
All notable changes to this project will be documented in this file.
14+
15+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
16+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
1017
"""
11-
# A Tera template to be rendered for each release in the changelog.
12-
# See https://keats.github.io/tera/docs/#introduction
1318
body = """
1419
{% if version -%}
1520
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
@@ -19,12 +24,12 @@ body = """
1924
{% for group, commits in commits | group_by(attribute="group") %}
2025
### {{ group | striptags | trim | upper_first }}
2126
{% for commit in commits %}
22-
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
27+
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
28+
{% if commit.breaking %}[**breaking**] {% endif %}\
29+
{{ commit.message | split(pat="\n") | first | upper_first | trim }}\
2330
{% endfor %}
2431
{% endfor %}\n
2532
"""
26-
# A Tera template to be rendered as the changelog's footer.
27-
# See https://keats.github.io/tera/docs/#introduction
2833
footer = """
2934
{% for release in releases -%}
3035
{% if release.version -%}
@@ -49,41 +54,45 @@ footer = """
4954
{% endfor %}
5055
<!-- generated by git-cliff -->
5156
"""
52-
# Remove leading and trailing whitespaces from the changelog's body.
5357
trim = true
5458

59+
# Pin the remote explicitly so the footer's compare/tree links are
60+
# deterministic. Auto-detection from the origin URL can fail transiently
61+
# (e.g. a remote/API lookup hiccup during `task release`), which renders the
62+
# owner/repo as empty and produces broken `https://github.com///compare/...`
63+
# links.
5564
[remote.github]
5665
owner = "peczenyj"
5766
repo = "runtimevar-consul"
5867

5968
[git]
60-
# Parse commits according to the conventional commits specification.
61-
# See https://www.conventionalcommits.org
6269
conventional_commits = true
63-
# Exclude commits that do not match the conventional commits specification.
64-
# This drops "Initial commit", merge commits, and similar non-conventional noise.
65-
filter_unconventional = true
66-
# An array of regex based parsers for extracting data from the commit message.
67-
# Assigns commits to Keep a Changelog groups by their Conventional Commit type.
68-
# Parsers are evaluated in order; the first match wins. The "<!-- N -->" prefixes
69-
# only control section ordering and are stripped by `striptags` in the template.
70+
# Keep non-conventional commits too; the prose fallbacks below route them.
71+
filter_unconventional = false
72+
filter_commits = false
73+
topo_order = false
74+
sort_commits = "oldest"
7075
commit_parsers = [
76+
# Drop merge commits so they never leak into the changelog.
7177
{ message = "^Merge", skip = true },
72-
{ message = "^revert", group = "<!-- 4 -->Reverted" },
73-
# CI-scoped changes are internal regardless of type (feat/fix/etc.).
74-
{ message = "^\\w+\\(ci\\)", skip = true },
75-
{ message = "^ci", skip = true },
78+
# --- Conventional Commit types (preferred) ---
7679
{ message = "^feat", group = "<!-- 0 -->Added" },
77-
{ message = "^fix", group = "<!-- 1 -->Fixed" },
78-
{ message = "^perf", group = "<!-- 2 -->Changed" },
79-
# Everything else (docs, test, build, refactor, chore, style, deps bumps)
80-
# is internal and excluded from the user-facing changelog.
81-
{ message = "^.*", skip = true },
80+
{ message = "^perf", group = "<!-- 1 -->Changed" },
81+
{ message = "^refactor", group = "<!-- 1 -->Changed" },
82+
{ message = "^style", group = "<!-- 1 -->Changed" },
83+
{ message = "^revert", group = "<!-- 1 -->Changed" },
84+
{ message = "^deprecat", group = "<!-- 2 -->Deprecated" },
85+
{ message = "^remove", group = "<!-- 3 -->Removed" },
86+
{ message = "^fix", group = "<!-- 4 -->Fixed" },
87+
{ message = "^security", group = "<!-- 5 -->Security" },
88+
{ message = "^docs", group = "<!-- 6 -->Documentation" },
89+
# Housekeeping types are not user-facing: keep them out of the changelog.
90+
{ message = "^(chore|ci|build|test)(\\(|:|!)", skip = true },
91+
# --- Prose fallbacks for non-conventional history ---
92+
{ message = "^[Ii]nitial", group = "<!-- 0 -->Added" },
93+
{ message = "^([Aa]dd|[Ss]upport)", group = "<!-- 0 -->Added" },
94+
{ message = "^.*: ([Aa]dd|[Ss]upport)", group = "<!-- 0 -->Added" },
95+
{ message = "^[Rr]emove", group = "<!-- 3 -->Removed" },
96+
{ message = "^([Ff]ix|.*: [Ff]ix)", group = "<!-- 4 -->Fixed" },
97+
{ message = ".*", group = "<!-- 1 -->Changed" },
8298
]
83-
# Prevent commits that are breaking from being excluded by commit parsers.
84-
filter_commits = false
85-
# Order releases topologically instead of chronologically.
86-
topo_order = false
87-
# Order of commits in each group/release within the changelog.
88-
# Allowed values: newest, oldest
89-
sort_commits = "oldest"

0 commit comments

Comments
 (0)