-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliff.toml
More file actions
119 lines (112 loc) · 4.37 KB
/
cliff.toml
File metadata and controls
119 lines (112 loc) · 4.37 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
# SPDX-License-Identifier: PMPL-1.0-or-later
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
#
# git-cliff configuration for conventional commit changelog generation.
# https://git-cliff.org/docs/configuration
#
# Placeholders — replace before first use:
# hyperpolymath — GitHub organization or username
# typell — GitHub repository name
[changelog]
# Changelog header
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
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
<!-- Generated by git-cliff: https://git-cliff.org -->\n
"""
# Template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{%- macro remote_url() -%}
https://github.com/hyperpolymath/typell
{%- 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 }}
{% for commit in commits %}
- {% if commit.scope %}**{{ commit.scope }}:** {% endif %}\
{% if commit.breaking %}[**BREAKING**] {% endif %}\
{{ commit.message | upper_first }}\
{%- if commit.links %} \
({% for link in commit.links %}[{{ link.text }}]({{ link.href }}){% endfor %}){% endif -%}
{% endfor %}
{% endfor %}
{%- if github -%}
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
### New Contributors
{%- for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
* @{{ contributor.username }} made their first contribution
{%- if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }})
{%- endif %}
{%- endfor %}
{% endif -%}
{% endif -%}
"""
# Template for the changelog footer
footer = """
{%- macro remote_url() -%}
https://github.com/hyperpolymath/typell
{%- 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 }}
{% endif -%}
{% else -%}
{% if release.previous.version -%}
[Unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}...HEAD
{% endif -%}
{% endif -%}
{% endfor %}
<!-- Generated by git-cliff -->
"""
# Remove leading and trailing whitespace from templates
trim = true
[git]
# Parse conventional commits
# https://www.conventionalcommits.org
conventional_commits = true
# Filter out unconventional commits
filter_unconventional = true
# Process each line of a commit as an individual commit
split_commits = false
# Regex for commit preprocessing
commit_preprocessors = [
# Remove issue numbers from commit messages
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
]
# Regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->Features" },
{ message = "^fix", group = "<!-- 1 -->Bug Fixes" },
{ message = "^security", group = "<!-- 2 -->Security" },
{ message = "^perf", group = "<!-- 3 -->Performance" },
{ message = "^refactor", group = "<!-- 4 -->Refactoring" },
{ message = "^docs", group = "<!-- 5 -->Documentation" },
{ message = "^style", group = "<!-- 6 -->Styling" },
{ message = "^test", group = "<!-- 7 -->Testing" },
{ message = "^ci", group = "<!-- 8 -->CI/CD" },
{ message = "^chore\\(release\\)", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore", group = "<!-- 9 -->Miscellaneous" },
{ body = ".*security", group = "<!-- 2 -->Security" },
]
# Protect breaking changes from being skipped by a commit parser
protect_breaking_commits = false
# Filter out merge commits
filter_merge_commits = true
# Filter out commits by tag pattern (skip pre-releases)
# tag_pattern = "v[0-9].*"
# Regex for skipping tags
# skip_tags = "beta|alpha"
# Sort commits within each group by oldest first
sort_commits = "oldest"