@@ -23,9 +23,19 @@ body = """
2323 ## [Unreleased]
2424{% endif -%}
2525
26+ {%- set breaking_commits = commits | filter(attribute="breaking", value=true) -%}
27+ {%- if breaking_commits | length > 0 %}
28+ ## Breaking changes
29+ {% for commit in breaking_commits %}
30+ - {% if commit.scope %}**{{ commit.scope | upper_first }}**: {% endif %}\
31+ {{ commit.breaking_description | upper_first }} \
32+ [{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }})
33+ {% endfor %}
34+ {% endif -%}
35+
2636{% for group, commits in commits | group_by(attribute="group") %}
2737 ### {{ group | upper_first }}
28- {%- for commit in commits %}
38+ {% for commit in commits %}
2939 - {{ commit.message | split(pat="\n ") | first | upper_first | trim }}\
3040 {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}
3141 {% if commit.remote.pr_number %} in \
@@ -45,6 +55,7 @@ body = """
4555 {%- endif %}
4656{%- endfor %}\n
4757"""
58+
4859# template for the changelog footer
4960footer = """
5061{%- macro remote_url() -%}
@@ -77,6 +88,7 @@ commit_parsers = [
7788 { message = " ^fix*" , group = " <!-- 1 -->:bug: Bug fixes" },
7889 { message = " ^perf*" , group = " <!-- 2 -->:zap: Performance" },
7990 { message = " ^chore*" , group = " <!-- 3 -->:gear: Miscellaneous" },
91+ { message = " ^docs*" , group = " <!-- 3 -->:page_facing_up: Documentation" },
8092]
8193
8294# filter out the commits that are not matched by commit parsers
0 commit comments