2 files changed, 43 insertions(+), 3 deletions(-)
@@ -1,0 +1,36 @@
[remote.github]
owner = "y2w8"
repo = "nmrs-tui"
[changelog]
header = """
# Changelog
All notable changes to the `nmrs-tui` crate will be documented in this file.
## [Unreleased]
"""
body = """
{% 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/nmrs-tui/commit/{{ commit.id }})), \
by @{{ commit.remote.username | default(value="y2w8") }}
{% endfor %}
{% endfor -%}
"""
trim = true
[git]
conventional_commits = true
filter_unconventional = false
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->Added" },
{ message = "^fix", group = "<!-- 1 -->Fixed" },
{ message = "^refactor", group = "<!-- 2 -->Changed" },
{ message = "^chore: release", skip = true },
{ message = ".*", group = "<!-- 3 -->Other" },
]
@@ -5,7 +5,11 @@
pre-release-commit-message = "chore: release {{version}}"
tag-message = "Release {{version}}"
# Changelog integration
pre-release-replacements = [
{ file = "CHANGELOG.md", search = "## \\[Unreleased\\]", replace = "## [Unreleased]\n\n## [{{version}}] - {{date}}", exactly = 1 },
pre-release-hook = [
"git-cliff",
"--tag",
"{{version}}",
"--unreleased",
"--prepend",
"CHANGELOG.md",
]