60 lines
2.2 KiB
TOML
60 lines
2.2 KiB
TOML
|
[changelog]
|
||
|
body = """
|
||
|
{% if version %}\
|
||
|
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
||
|
{% else %}\
|
||
|
## [unreleased]
|
||
|
{% endif %}\
|
||
|
|
||
|
|
||
|
{% for group, commits in commits | group_by(attribute="group") %}
|
||
|
### {{ group | upper_first }}
|
||
|
{% for commit in commits
|
||
|
| filter(attribute="scope")
|
||
|
| sort(attribute="scope") %}
|
||
|
* *({{commit.scope}})* {{ commit.message | upper_first }}
|
||
|
{%- if commit.breaking %}
|
||
|
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
||
|
{%- endif -%}
|
||
|
{%- endfor -%}
|
||
|
{%- for commit in commits %}
|
||
|
{%- if commit.scope -%}
|
||
|
{% else -%}
|
||
|
* {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))
|
||
|
{% if commit.breaking -%}
|
||
|
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
||
|
{% endif -%}
|
||
|
{% endif -%}
|
||
|
{% endfor -%}
|
||
|
{% raw %}\n{% endraw %}\
|
||
|
{% endfor %}\n
|
||
|
|
||
|
"""
|
||
|
#{% for group, commits in commits | group_by(attribute="group") %}
|
||
|
# ### {{ group | upper_first }}
|
||
|
# {% for commit in commits %}\
|
||
|
# - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))
|
||
|
# {% endfor %}\
|
||
|
#{% endfor %}\n
|
||
|
# remove the leading and trailing whitespace from the template
|
||
|
trim = true
|
||
|
|
||
|
[git]
|
||
|
conventional_commits = true
|
||
|
filter_unconventional = false
|
||
|
commit_parsers = [
|
||
|
{ message = ".*(deps).*", group = "Dependencies"},
|
||
|
{ message = "^feat", group = "Features"},
|
||
|
{ message = "^fix", group = "Bug Fixes"},
|
||
|
{ message = "^doc", group = "Documentation"},
|
||
|
{ message = "^perf", group = "Performance"},
|
||
|
{ message = "^refactor", group = "Refactor"},
|
||
|
{ message = "^style", group = "Styling"},
|
||
|
{ message = "^test", group = "Testing"},
|
||
|
{ message = "^chore\\(release\\): prepare for", skip = true},
|
||
|
{ message = "^chore", group = "Miscellaneous Tasks"},
|
||
|
{ body = ".*security", group = "Security"},
|
||
|
{ message = ".*", group = "Other", default_scope = "other"}, # Everything that's not a conventional commit goes into the "Other" category
|
||
|
]
|
||
|
|