[changelog]
header = """# Changelog

All notable changes to momapy will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Conventional Commits](https://www.conventionalcommits.org/).

"""
body = """
{%- macro remote_url() -%}
  https://github.com/adrienrougny/momapy
{%- endmacro -%}

{% 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 %}
- {{ commit.message | upper_first | trim }}\
  {% if commit.scope %} *({{ commit.scope }})*{% endif %}\
  {% if commit.breaking %} **BREAKING**{% endif -%}
{% endfor %}
{% endfor %}
"""
footer = ""
trim = true

[git]
conventional_commits = true
filter_unconventional = false
split_commits = false
commit_parsers = [
  { message = "^feat", group = "Added" },
  { message = "^fix", group = "Fixed" },
  { message = "^perf", group = "Performance" },
  { message = "^refactor", group = "Changed" },
  { message = "^doc", group = "Documentation" },
  { message = "^style", group = "Styling" },
  { message = "^test", group = "Testing" },
  { message = "^ci", group = "CI/CD" },
  { message = "^chore", group = "Miscellaneous" },
  { message = ".*", group = "Other" },
]
protect_breaking_commits = false
filter_commits = false
tag_pattern = "v[0-9].*"
skip_tags = "commute-v1.0"
sort_commits = "newest"
