index : nmrs-tui
A fast, Vim-friendly NetworkManager TUI built in Rust.
about summary refs log tree commit diff
author Yousef Al-Harbi <yo2w86@gmail.com> 2026-11-21 23:22:43 +0300
committer Yousef Al-Harbi <yo2w86@gmail.com> 2026-11-21 23:22:43 +0300
commit 69b0b7c49fa7f696807ace5e0ba443c0aadbe1fc [patch]
tree 7b032314f4751e2d775c9fd01f8d4ebb0da502a2
parent d157a18bd5fc6a86092c926fe4e32e16a7fef4aa
download 69b0b7c49fa7f696807ace5e0ba443c0aadbe1fc.tar.gz

Add: git-cliff

Diffstat

-rw-r--r-- cliff.toml 36
-rw-r--r-- release.toml 10
 2 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/cliff.toml b/cliff.toml
new file mode 100644
index 0000000..6f941a0 100644
--- /dev/null
+++ b/cliff.toml
@@ -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" },
]
diff --git a/release.toml b/release.toml
index 75dc17e..cf3c290 100644
--- a/release.toml
+++ b/release.toml
@@ -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",
]