-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpre-1.0-cliff.toml
More file actions
92 lines (82 loc) · 4.46 KB
/
pre-1.0-cliff.toml
File metadata and controls
92 lines (82 loc) · 4.46 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
# git-cliff configuration file, see: https://git-cliff.org/docs/configuration
[changelog]
header = """
# Changelog
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
"""
body = """
{% if version %}
## \\[[{{ version | trim_start_matches(pat="v") }}](https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/{% if previous.version -%}compare/{{ previous.version }}...{% else -%}commits/{% endif -%}{{ version }})\\] - {{ timestamp | date(format="%Y-%m-%d") }}
{% elif previous.version %}
## \\[[Unreleased](https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/compare/{{ previous.version }}...HEAD)\\]
{% else %}
## \\[Unreleased\\]
{% endif -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | upper_first }}
{% for commit in commits -%}
- {% if commit.breaking %}\\[**BREAKING**\\] {% endif %}\
{% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{{ commit.message | split(pat="\n") | first | upper_first }}\
{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}\
{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.remote.pr_number }}){% endif %}
{% if commit.body and "dependabot" not in commit.author.name %}
{%- for line in commit.body | split(pat="\n\n") %}
{%- raw %} {% endraw %}- {{ line | trim_start_matches(pat="*") | trim_start_matches(pat="-") | replace(from="\n", to=" ") | trim | upper_first }}
{% endfor -%}
{% endif -%}
{% if commit.breaking and commit.breaking_description != commit.message %}
{%- raw %} {% endraw %}- **Breaking Change**: {{ commit.breaking_description | upper_first }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
{%- if loop.first %}
### First-time Contributors
{% endif %}
- @{{ contributor.username }} made their first contribution\
{% if contributor.pr_number %} in [#{{ contributor.pr_number }}](https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ contributor.pr_number }}){% endif -%}
{%- if loop.last %}\n{% endif -%}
{% endfor %}
"""
footer = """
<!-- generated by git-cliff -->
"""
# Remove the leading and trailing whitespace from the templates
trim = true
[git]
# Parse commits based on https://www.conventionalcommits.org
conventional_commits = true
# Filter out the commits that are not conventional
filter_unconventional = false
# Regex for parsing and grouping commits
commit_parsers = [
{ message = "^chore: Prepare next release", skip = true }, # Don't show the automated commits that just prepare the release in the changelog
{ field = "author.name", pattern = "dependabot\\[bot\\]", group = "<!-- 10 -->Automated Changes"},
{ field = "author.name", pattern = "github-actions\\[bot\\]", group = "<!-- 10 -->Automated Changes"},
{ field = "author.name", pattern = "holochain-release-automation[0-9]*", group = "<!-- 10 -->Automated Changes"},
{ message = "^feat", group = "<!-- 00 -->Features" },
{ message = "^fix", group = "<!-- 01 -->Bug Fixes" },
{ message = "^perf", group = "<!-- 02 -->Performance" },
{ message = "^chore", group = "<!-- 03 -->Miscellaneous Tasks" },
{ message = "^build", group = "<!-- 04 -->Build System" },
{ message = "^ci", group = "<!-- 05 -->CI" },
{ message = "^test", group = "<!-- 06 -->Testing" },
{ message = "^refactor", group = "<!-- 07 -->Refactor" },
{ message = "^style", group = "<!-- 08 -->Styling" },
{ message = "^docs", group = "<!-- 09 -->Documentation"},
{ message = ".*", group = "<!-- 11 -->Other Changes"},
]
# Do not filter out the commits that are not matched by commit parsers
filter_commits = false
# Do not sort the tags topologically, therefore sort chronologically. See: https://git-cliff.org/blog/page/2#--topo-order
topo_order = false
# Show the newest commits in each section first
sort_commits = "newest"
[bump]
# Want to use a `v` prefix, so set the initial tag and git-cliff will respect it after that
initial_tag = "v0.1.0"
# For these, this is how we want to work with crates that have a `0.x.y` version.
features_always_bump_minor = false
breaking_always_bump_major = false