-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcliff.toml
More file actions
104 lines (95 loc) · 5.12 KB
/
Copy pathcliff.toml
File metadata and controls
104 lines (95 loc) · 5.12 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
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration
[remote.github]
owner = "Nicconike"
repo = "LocalTelemetry"
[changelog]
# A Tera template to be rendered as the changelog's header.
# See https://keats.github.io/tera/docs/#introduction
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/), this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Conventional Commits](https://www.conventionalcommits.org/).
"""
# A Tera template to be rendered for each release in the changelog.
# Group order is imposed by HTML-comment prefixes in commit_parsers
# (see https://git-cliff.org/docs/tips-and-tricks#changing-the-group-order).
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%d-%m-%Y") }}
{% else %}\
## [Unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}\
### {{ group | striptags | trim | upper_first }}
{% for commit in commits | unique(attribute="message") %}\
- {{ commit.message | split(pat="\n") | first | trim }}{% if commit.scope %} ({{ commit.scope }}){% endif %} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/commit/{{ commit.id }}))
{% endfor %}
{% endfor %}
"""
# A Tera template to be rendered as the changelog's footer.
footer = """
{% for release in releases -%}
{% if release.version -%}
{% if release.previous.version -%}
[{{ release.version | trim_start_matches(pat="v") }}]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/compare/{{ release.previous.version }}...{{ release.version }}
{% else -%}
[{{ release.version | trim_start_matches(pat="v") }}]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/tree/{{ release.version }}
{% endif -%}
{% else -%}
[unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/compare/{{ release.previous.version }}...HEAD
{% endif -%}
{% endfor %}
"""
# Remove leading and trailing whitespaces from the changelog's body.
trim = true
postprocessors = [{ pattern = "<!-- generated by git-cliff -->", replace = "" }]
[git]
# Parse commits according to the conventional commits specification.
# See https://www.conventionalcommits.org
conventional_commits = true
# Include commits that do not match the conventional commits specification
# (e.g. merge commits) so that nothing is silently dropped.
filter_unconventional = false
# Split commits on newlines, treating each line as an individual commit.
split_commits = false
# Exclude commits that are not matched by any commit parser.
filter_commits = false
# An array of regex based parsers to modify commit messages prior to further processing.
commit_preprocessors = []
# Order releases topologically instead of chronologically.
topo_order = false
# Order of commits in each group/release within the changelog.
# Allowed values: newest, oldest
sort_commits = "newest"
# Commit parsers assign every commit to a group. PR-label based rules are
# evaluated first (GitHub PR labels, fetched online via GITHUB_TOKEN; in
# offline mode they are empty and fall through to the conventional message
# rules below). Group order is imposed by the "<!-- N -->" prefixes.
commit_parsers = [
{ skip = true, message = "^Merge " },
{ field = "github.pr_labels", pattern = "breaking-change|major", group = "<!-- 0 -->Breaking Changes" },
{ field = "github.pr_labels", pattern = "performance|perf", group = "<!-- 3 -->Performance Improvements" },
{ field = "github.pr_labels", pattern = "enhancement", group = "<!-- 1 -->Features" },
{ field = "github.pr_labels", pattern = "bug", group = "<!-- 2 -->Bug Fixes" },
{ field = "github.pr_labels", pattern = "documentation", group = "<!-- 5 -->Documentation" },
{ field = "github.pr_labels", pattern = "refactor", group = "<!-- 7 -->Code Refactoring" },
{ field = "github.pr_labels", pattern = "testing", group = "<!-- 8 -->Tests" },
{ field = "github.pr_labels", pattern = "dependencies", group = "<!-- 9 -->Build Systems" },
{ field = "github.pr_labels", pattern = "scope:ci|ci|actions", group = "<!-- 10 -->Continuous Integration" },
{ field = "github.pr_labels", pattern = "chore", skip = true },
{ message = "^.*!:", group = "<!-- 0 -->Breaking Changes" },
{ footer = "BREAKING CHANGE", group = "<!-- 0 -->Breaking Changes" },
{ message = "^feat", group = "<!-- 1 -->Features" },
{ message = "^fix", group = "<!-- 2 -->Bug Fixes" },
{ message = "^perf", group = "<!-- 3 -->Performance Improvements" },
{ message = "^revert", group = "<!-- 4 -->Reverts" },
{ message = "^docs", group = "<!-- 5 -->Documentation" },
{ message = "^style", group = "<!-- 6 -->Styles" },
{ message = "^refactor", group = "<!-- 7 -->Code Refactoring" },
{ message = "^test", group = "<!-- 8 -->Tests" },
{ message = "^build", group = "<!-- 9 -->Build Systems" },
{ message = "^ci", group = "<!-- 10 -->Continuous Integration" },
{ message = "^chore", skip = true },
{ message = ".*", skip = true },
]