[remote.github]
owner = "y2w8"
repo = "{{project-name}}"

[changelog]
header = """
# Changelog
All notable changes to the `{{project-name}}` crate will be documented in this file.

## [Unreleased]
"""
body = """
{% raw %}{% if version -%}
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim }}
{% for commit in commits -%}
- {{ commit.message | split(pat="\\n") | first | upper_first | trim }} \
([{{ commit.id | truncate(length=7, end="") }}](https://github.com/y2w8/{% endraw %}{{project-name}}{% raw %}/commit/{{ commit.id }})), \
by @{{ commit.remote.username | default(value=commit.author.name) }}
{% endfor %}
{% endfor -%}{% endraw %}
"""
trim = true

[git]
conventional_commits = true
filter_unconventional = false
split_commits = false
commit_parsers = [
  { message = "^feat", group = "<!-- 0 -->Added" },
  { message = "^fix", group = "<!-- 1 -->Fixed" },
  { message = "^refactor", group = "<!-- 2 -->Changed" },
  { message = "^perf", group = "<!-- 3 -->Performance" },
  { message = "^doc", group = "<!-- 4 -->Documentation" },
  { message = "^chore: release", skip = true },
  { message = "^chore\\(release\\)", skip = true },
  { message = ".*", group = "<!-- 5 -->Other" },
]
filter_commits = false
tag_pattern = "v[0-9].*"
sort_commits = "newest"
