[changelog]
header = """
# Changelog

All notable changes to TRCAA are documented here.
Commit types shown: feat, fix, perf, docs, refactor.
CI, chore, and build changes are excluded.

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

[git]
conventional_commits = true
filter_unconventional = true
tag_pattern = "v[0-9].*"
ignore_tags = "rc|alpha|beta"
sort_commits = "oldest"
commit_parsers = [
  # Internal migration commits — never expose in release notes
  { message = "(?i)full.copy.from.apollo", skip = true },
  { message = "(?i)trcaa.*sanitiz",        skip = true },
  { message = "^feat",     group = "Features" },
  { message = "^fix",      group = "Bug Fixes" },
  { message = "^perf",     group = "Performance" },
  { message = "^docs",     group = "Documentation" },
  { message = "^refactor", group = "Refactoring" },
  { message = "^ci|^chore|^build|^test|^style", skip = true },
]
