|
1 | 1 | [workspace]
|
2 | 2 | git_release_name = "{{ version }}"
|
3 | 3 | git_tag_name = "{{ version }}"
|
| 4 | + |
| 5 | +[changelog] |
| 6 | +body = """ |
| 7 | +## [{{ version | trim_start_matches(pat="v") }}]\ |
| 8 | + {%- if release_link -%}\ |
| 9 | + ({{ release_link }})\ |
| 10 | + {% endif %} \ |
| 11 | + - {{ timestamp | date(format="%Y-%m-%d") }} |
| 12 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 13 | +### {{ group | upper_first }} |
| 14 | + {% for commit in commits %} |
| 15 | + - {% if commit.scope -%}{{ commit.scope | upper_first }}: {% endif %} |
| 16 | + {%- if commit.breaking %}[**breaking**] {% endif %} |
| 17 | + {{- commit.message }} |
| 18 | + {%- if commit.links %} ([{{ commit.links.1.text }}]({{ commit.links.1.href }})){% endif -%} |
| 19 | + {% endfor %} |
| 20 | +{% endfor %} |
| 21 | +{%- if github -%} |
| 22 | +{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} |
| 23 | + ## New Contributors ❤️ |
| 24 | +{% endif %}\ |
| 25 | +{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} |
| 26 | + * @{{ contributor.username }} made their first contribution |
| 27 | + {%- if contributor.pr_number %} in \ |
| 28 | + [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ |
| 29 | + {%- endif %} |
| 30 | +{%- endfor -%} |
| 31 | +{%- endif %} |
| 32 | +""" |
| 33 | + |
| 34 | +commit_parsers = [ |
| 35 | + { message = '(?i)^(\w+: )?feat', group = "added" }, |
| 36 | + { message = '(?i)^(\w+: )?add', group = "added" }, |
| 37 | + { message = '(?i)^(\w+: )?change', group = "changed" }, |
| 38 | + { message = '(?i)^(\w+: )?deprecate', group = "deprecated" }, |
| 39 | + { message = '(?i)^(\w+: )?remove', group = "removed" }, |
| 40 | + { message = '(?i)^(\w+: )?fix', group = "fixed" }, |
| 41 | + { message = '(?i)^(\w+: )?fix', group = "fixed" }, |
| 42 | + { message = '^.*', group = "other" }, |
| 43 | +] |
| 44 | + |
| 45 | +link_parsers = [ |
| 46 | + # Extract backport patterns |
| 47 | + { pattern = '\(backport <.*/(\d+)>\)', text = "#$1", href = "https://github.com/rust-lang/libc/pulls/$1"} |
| 48 | +] |
0 commit comments