-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrelease-plz.toml
106 lines (84 loc) · 4.15 KB
/
release-plz.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
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
[workspace]
changelog_update = true
dependencies_update = true
git_tag_enable = true
git_release_enable = false
pr_labels = ["release"]
allow_dirty = false
publish_allow_dirty = false
semver_check = false
[changelog]
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^dep-update", group = "<!-- 11 --> Dependency updates" },
{ message = "^build\\(deps\\)", group = "<!-- 11 --> Dependency updates" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
{ message = ".*", group = "<!-- 10 -->💼 Other" },
]
commit_preprocessors = [
# Replace `foo` with `bar`
{ pattern = "foo", replace = "bar" },
# Replace `<REPO>` in the template body with the repository URL
{ pattern = '<REPO>', replace = "https://github.com/unleash/actix-middleware-etag" },
# Replace multiple spaces with a single space.
{ pattern = " +", replace = " " },
# Replace the issue number with the link.
{ pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](https://github.com/unleash/actix-middleware-etag/issues/${1}))" },
# Remove prefix
{ pattern = 'Merged PR #[0-9]: (.*)', replace = "$1" },
# Remove gitmoji from commit messages, both actual UTF emoji and :emoji:
{ pattern = ' *(:\w+:|[\p{Emoji_Presentation}\p{Extended_Pictographic}\u{200D}]) *', replace = "" },
# Hyperlink PR references from merge commits.
{ pattern = "Merge pull request #([0-9]+) from [^ ]+", replace = "PR # [${1}](https://github.com/unleash/actix-middleware-etag/pull/${1}):" },
# Hyperlink commit links, with short commit hash as description.
{ pattern = "https://github.com/unleash/actix-middleware-etag/commit/([a-f0-9]{7})[a-f0-9]*", replace = "commit # [${1}](${0})" },
# Linear issue references
{ pattern = "\\(([0-9]-[0-9]+)\\)", replace = "Linear issue: [${1}](https://linear.app/unleash/issue/${1})"},
# Hyperlink bare commit hashes like "abcd1234" in commit logs, with short commit hash as description.
{ pattern = "([ \\n])(([a-f0-9]{7})[a-f0-9]*)", replace = "${1}commit # [${3}](https://github.com/unleash/actix-middleware-etag/commit/${2})" },
]
body = """
## [{{ version | trim_start_matches(pat="v") }}]\
{%- if release_link -%}\
({{ release_link }})\
{% endif %} \
- {{ timestamp | date(format="%Y-%m-%d") }}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
{%- if commit.scope -%}
- *({{commit.scope}})* {% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message }}{{ self::username(commit=commit) }}\
{%- if commit.links %} \
({% for link in commit.links %}[{{link.text}}]({{link.href}}) {% endfor -%})\
{% endif %}
{% else -%}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }}{{ self::username(commit=commit) }}{{ self::pr(commit=commit) }}
{% endif -%}
{% endfor -%}
{% endfor %}
{%- if remote.contributors %}
### Contributors
{% for contributor in remote.contributors %}
* @{{ contributor.username }}
{%- endfor %}
{% endif -%}
{%- macro username(commit) -%}
{% if commit.remote.username %} (by @{{ commit.remote.username }}){% endif -%}
{% endmacro -%}
{%- macro pr(commit) -%}
{% if commit.remote.pr_number %} - #{{ commit.remote.pr_number }}{% endif -%}
{% endmacro -%}
"""