-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcliff.toml
81 lines (77 loc) · 2.96 KB
/
cliff.toml
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
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration
[changelog]
header = "# Changelog\n"
# spell-checker: disable
body = """
{% macro commit_refs(commit) %}\
{% set ref_links = [] -%}\
{% for footer in commit.footers %}\
{% set int_value = footer.value | int(default=-1) %}\
{% if (footer.value is matching("^\\d+$")) and (int_value > 0) and (footer.token in ["close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved"]) %}\
{% set encoded_value = int_value | as_str | urlencode_strict %}\
{% set_global ref_links = ref_links | concat(with=("[#" ~ int_value ~ "](https://github.com/hikiko4ern/swc-plugin-minify-graphql/issues/" ~ encoded_value ~ ")")) %}\
{% endif %}\
{% endfor %}\
{% if ref_links %} ({{ ref_links | unique | join(sep=", ") }}){% endif -%}
{% endmacro commit_refs %}\
\
{% raw %}\n{% endraw %}\
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% set breaking_commits = commits | filter(attribute="breaking", value=true) -%}
{% if breaking_commits %}
### BREAKING CHANGES
{% for commit in breaking_commits %}
- {% if commit.scope %}**({{commit.scope}})** {% endif %}{{commit.breaking_description}}
{% endfor %}\
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
{% set related_issues = commit.footers | filter(attribute="token", value="closes") | map(attribute="value") | unique -%}\
- {% if commit.breaking %}**\\[breaking\\]** {% endif -%}
{% if commit.scope %}**({{commit.scope}})** {% endif -%}
{{ commit.message }}\
{{ self::commit_refs(commit=commit) }}
{%- endfor -%}
{% raw %}\n{% endraw %}\
{% endfor %}\
"""
# spell-checker: enable
trim = true
[git]
conventional_commits = true
filter_unconventional = true
split_commits = false
commit_parsers = [
# ignore
{ sha = "393a2bbf704825d51c2659e14d42e1d71ed9e325", skip = true },
{ sha = "da3317643bfd416a13f516458f052a5fd10da8e3", skip = true },
# groups
{ message = "chore\\((build|changelog|dev|deps|release|utils|internal)(\\)|,)", skip = true },
{ message = "^fix", group = "<!-- 1 -->Bug Fixes" },
{ message = "^feat", group = "<!-- 2 -->Features" },
{ message = "^docs", group = "Documentation", skip = true },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactor", skip = true },
{ message = "^style", group = "Styling" },
{ message = "^test", group = "Testing" },
{ message = "^chore", group = "Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 0 -->Security" },
]
protect_breaking_commits = true
filter_commits = false
tag_pattern = "v[0-9].*"
skip_tags = ""
ignore_tags = ""
# spell-checker: ignore topo
topo_order = false
sort_commits = "oldest"
[bump]
initial_tag = "v0.1.0"
features_always_bump_minor = false
breaking_always_bump_major = false