|
| 1 | +[workspace] |
| 2 | +git_release_body = """ |
| 3 | +{{ changelog }} |
| 4 | +{% if remote.contributors %} |
| 5 | +### Thanks to the contributors for this release: |
| 6 | +{% for contributor in remote.contributors %} |
| 7 | +* @{{ contributor.username }} |
| 8 | +{% endfor %} |
| 9 | +{% endif %} |
| 10 | +""" |
| 11 | + |
| 12 | +[changelog] |
| 13 | +header = "# Changelog" |
| 14 | +body = """ |
| 15 | +{%- macro username(commit) -%} |
| 16 | + {% if commit.remote.username %} (by @{{ commit.remote.username }}){% endif -%} |
| 17 | +{% endmacro -%} |
| 18 | +{% macro commit_message(commit) %} |
| 19 | + - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ |
| 20 | + {% if commit.breaking %}[**breaking**] {% endif %}\ |
| 21 | + {{ commit.message | upper_first }}\ |
| 22 | + {{ self::username(commit=commit) }} \ |
| 23 | + {%- if commit.links %} \ |
| 24 | + {% for link in commit.links | unique(attribute="href") %}\ |
| 25 | + [[{{link.text}}]({{link.href}})] \ |
| 26 | + {% endfor %}\ |
| 27 | + {% endif %} |
| 28 | + {%- if commit.breaking and commit.breaking_description and not commit.breaking_description == commit.message%} |
| 29 | + > {{ commit.breaking_description -}} |
| 30 | + {% endif -%} |
| 31 | +{% endmacro %} |
| 32 | +## [{{ version | trim_start_matches(pat="v") }}]{%- if release_link -%}({{ release_link }}){% endif %} - {{ timestamp | date(format="%Y-%m-%d") -}} |
| 33 | +{%- for group, commits in commits | group_by(attribute="group") %} |
| 34 | +
|
| 35 | + ### {{ group | upper_first -}} |
| 36 | + {% for commit in commits |
| 37 | + | filter(attribute="scope") |
| 38 | + | sort(attribute="scope") -%} |
| 39 | + {{- self::commit_message(commit=commit) -}} |
| 40 | + {% endfor -%} |
| 41 | + {%- for commit in commits -%} |
| 42 | + {% if not commit.scope -%} |
| 43 | + {{- self::commit_message(commit=commit) -}} |
| 44 | + {% endif -%} |
| 45 | + {% endfor -%} |
| 46 | +{% endfor %} |
| 47 | +""" |
| 48 | +link_parsers = [ |
| 49 | + { pattern = "#(\\d+)", href = "https://github.com/davidcole1340/ext-php-rs/issues/$1" }, |
| 50 | +] |
0 commit comments