chore(changelog): add AI assistance mention to changelog

Add a mention next to the commit message when the commit is AI assisted
and group AI models used in an 'AI Assistance Repartition' section.

Assisted-by: Zed:gemini-3.1-pro
This commit is contained in:
2026-06-04 23:40:00 +02:00
committed by Rémi Heredero
parent 48e121313c
commit 7b2a879440

View File

@@ -25,8 +25,26 @@ body = """
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\ {% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }}\ {{ commit.message | upper_first }}\
{%- for footer in commit.footers -%}
{%- if footer.token == "Assisted-by" %} *(🤖 {{ footer.value | trim }})*{%- endif -%}
{%- endfor %}\
{% endfor %} {% endfor %}
{% endfor %}\n {% endfor %}
{%- set ai_models = [] -%}
{%- for commit in commits -%}
{%- for footer in commit.footers -%}
{%- if footer.token == "Assisted-by" -%}
{%- set_global ai_models = ai_models | concat(with=footer) -%}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}
{%- if ai_models | length > 0 %}
### 🤖 AI Assistance Repartition
{%- for model, occurrences in ai_models | group_by(attribute="value") %}
- **{{ model | trim }}**: {{ occurrences | length }} commit{% if occurrences | length > 1 %}s{% endif %}
{%- endfor %}
{% endif %}\n
""" """
# template for the changelog footer # template for the changelog footer
footer = """ footer = """