Skip to content

Commit

Permalink
ci: Breaking changes
Browse files Browse the repository at this point in the history
Add breaking changes to release notes
  • Loading branch information
techman83 committed Nov 8, 2024
1 parent e6e9224 commit 87c83fe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .NOTES.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,31 @@
{%- endfor -%}
{%- endmacro -%}

{#- macro: breaking_changes -#}
{%- macro breaking_changes(commit) -%}
{% set ns = namespace(found=false) %}
**BREAKING CHANGES**:
{%- for line in commit.body -%}
{% if ns.found %}
{{ line }}
{%- endif -%}
{%- if 'BREAKING CHANGES:' in line -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- endmacro -%}

{#- macro: render_section -#}
{%- macro render_section(section) -%}
### {{ section.type or "Misc" }}

{% for commit in section.commits|sort(attribute='author_date',reverse=true)|unique(attribute='subject') -%}
{{ render_commit(commit) }}
{%- if 'BREAKING CHANGES:' in commit.body -%}
{{ breaking_changes(commit) }}
{% endif %}
{% endfor %}

{%- endmacro -%}

{%- macro render_version(version) -%}
Expand Down

0 comments on commit 87c83fe

Please sign in to comment.