[changelog]
# changelog header
header = """
# Changelog

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

"""
# template for the changelog body
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 }}
{% for commit in commits -%}
- {{ commit.message | split(pat="\n") | first | trim }}{% if commit.breaking %} **[BREAKING]**{% endif %}
{% endfor -%}

{% endfor -%}
{% if version and previous.version -%}
**Full Changelog**: https://github.com/sorinirimies/tui-piechart/compare/{{ previous.version }}...{{ version }}
{% endif -%}
"""
# remove the leading and trailing whitespace from the template
trim = true

[git]
# allow all commit types (set to false to include non-conventional commits)
conventional_commits = false
# regex for parsing and grouping commits
commit_parsers = [
    { message = "^[Ff]eat(?:\\(.*\\))?:?\\s", group = "✨ Features" },
    { message = "^[Ff]ix(?:\\(.*\\))?:?\\s", group = "🐛 Bug Fixes" },
    { message = "^[Dd]ocs(?:\\(.*\\))?:?\\s", group = "📚 Documentation" },
    { message = "^[Pp]erf(?:\\(.*\\))?:?\\s", group = "⚡ Performance" },
    { message = "^[Rr]efactor(?:\\(.*\\))?:?\\s", group = "♻️ Refactor" },
    { message = "^[Ss]tyle(?:\\(.*\\))?:?\\s", group = "💄 Styling" },
    { message = "^[Tt]est(?:\\(.*\\))?:?\\s", group = "🧪 Testing" },
    { message = "^[Cc]hore(?:\\(.*\\))?:?\\s", group = "🔧 Chores" },
    { message = "^[Bb]uild(?:\\(.*\\))?:?\\s", group = "📦 Build" },
    { message = "^[Cc]i(?:\\(.*\\))?:?\\s", group = "🔄 CI" },
    { message = "^[Aa]dd(?:\\(.*\\))?:?\\s", group = "➕ Added" },
    { message = "^[Uu]pdate(?:\\(.*\\))?:?\\s", group = "🔄 Updated" },
    { message = "^[Ee]nhance(?:\\(.*\\))?:?\\s", group = "✅ Enhanced" },
    { message = "^[Ii]mprove(?:\\(.*\\))?:?\\s", group = "📈 Improvements" },
    { message = "^[Ii]ntroduce\\s", group = "✨ Features" },
    { message = ".*", group = "📦 Other Changes" },
]
# filter out the commits that are not matched by commit_parsers
filter_commits = false
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
# sort the tags chronologically
sort_tags = true
# protect breaking changes from being skipped due to matching skip pattern
protect_breaking_commits = true

[github]
# add GitHub release URLs to the changelog
add_links = true
# owner and repo that's hosting the project
owner = "sorinirimies"
repo = "tui-piechart"

# Generate links for issues and PRs
issues = true
pull_requests = true
# Use GitHub milestone as the version
use_milestone = false
# Link to GitHub milestone
link_milestone = false
