-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcliff.toml
More file actions
55 lines (50 loc) · 1.6 KB
/
cliff.toml
File metadata and controls
55 lines (50 loc) · 1.6 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
[remote.github]
owner = "sermuns"
repo = "MEREAD"
[bump]
features_always_bump_minor = true
breaking_always_bump_major = false
[changelog]
header = """
# Changelog\n
"""
body = """
{% if version %}\
{% if previous.version %}\
## [{{ version }}]($REPO/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [{{ version }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif %}\
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits
| filter(attribute="scope")
| sort(attribute="scope") -%}
{% if commit.scope -%}
- {{self::commit(commit=commit)}}\
{% endif -%}
{% endfor -%}
{% for commit in commits -%}
{% if commit.scope -%}
{% else -%}
- {{self::commit(commit=commit)}}\
{% endif -%}
{% endfor -%}
{% endfor -%}
{% macro commit(commit) -%}
{% if commit.scope %}**({{commit.scope}})** {% endif -%}
{% if commit.breaking %}**breaking** {% endif -%}
{{ commit.message | split(pat="\n") | first | trim }} by\
{% if commit.remote.username %} @{{commit.remote.username}}\
{% else %} {{commit.author.name}}{% endif %} in\
{% if commit.remote.pr_number %} [#{{ commit.remote.pr_number }}]($REPO/pull/{{ commit.remote.pr_number }})\
{% else %} [{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})\
{%- endif %}
{% endmacro commit -%}
"""
postprocessors = [
{ pattern = '\$REPO', replace = "https://github.com/sermuns/MEREAD" },
]