[changelog]
header = """
# Changelog\n
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
"""
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.breaking %}[**breaking**] {% endif %}\
{{ commit.message | split(pat="\n") | first | upper_first | trim }} \
[`{{ commit.id | truncate(length=7, end="") }}`]\
(https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/commit/{{ commit.id }})
{%- endfor %}
{% endfor %}\n
"""
footer = """
{% for release in releases -%}
{% if release.version -%}
{% if release.previous.version -%}
[{{ release.version | trim_start_matches(pat="v") }}]: \
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/compare/{{ release.previous.version }}..{{ release.version }}
{% else -%}
[{{ release.version | trim_start_matches(pat="v") }}]: \
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/tree/{{ release.version }}
{% endif -%}
{% else -%}
[unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/compare/{{ release.previous.version }}..HEAD
{% endif -%}
{% endfor -%}
"""
trim = true
postprocessors = [
{ pattern = '\n{3,}', replace = "\n\n" },
]
[git]
conventional_commits = true
filter_unconventional = false
filter_commits = false
protect_breaking_commits = true
tag_pattern = "v[0-9]*"
topo_order = false
sort_commits = "oldest"
commit_preprocessors = [
{ pattern = '\(#(\d+)\)', replace = '[#${1}](https://github.com/acgetchell/la-stack/pull/${1})' },
]
commit_parsers = [
{ message = "^Merge pull request", skip = true },
{ message = "^Merge branch", skip = true },
{ message = "^feat", group = "Added" },
{ message = "^fix", group = "Fixed" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Changed" },
{ message = "^docs?", group = "Documentation" },
{ message = "^test", group = "Changed" },
{ message = "^style", group = "Changed" },
{ message = "^[Bb]ump ", group = "Dependencies" },
{ message = "^[Aa]dd", group = "Added" },
{ message = "^[Ss]upport", group = "Added" },
{ message = "^[Rr]emove", group = "Removed" },
{ message = "^[Dd]elete", group = "Removed" },
{ message = "^[Cc]hange", group = "Changed" },
{ message = "^chore|^ci", group = "Maintenance" },
{ message = ".*", group = "Changed" },
]
[remote.github]
owner = "acgetchell"
repo = "la-stack"