From 089e300f083480a0cdd69fb1485e1e363c10beb4 Mon Sep 17 00:00:00 2001 From: Tushar Mathur Date: Wed, 27 Nov 2024 22:35:41 -0800 Subject: [PATCH] chore: update changelog template --- .release-plz.toml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.release-plz.toml b/.release-plz.toml index d80ebee..5516944 100644 --- a/.release-plz.toml +++ b/.release-plz.toml @@ -2,8 +2,39 @@ dependencies_update = true # update dependencies with `cargo update` [changelog] -header = "# Changelog" -body = "Body" +header = """# Changelog + +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). + +## [Unreleased] +""" + +body = """ + +## [{{ version | trim_start_matches(pat="v") }}]\ + {%- if release_link -%}\ + ({{ release_link }})\ + {% endif %} \ + - {{ timestamp | date(format="%Y-%m-%d") }} +{% for group, commits in commits | group_by(attribute="group") %} +### {{ group | upper_first }} + {% for commit in commits %} + {%- if commit.scope -%} + - *({{commit.scope}})* {% if commit.breaking %}[**breaking**] {% endif %}\ + {{ commit.message }}\ + {%- if commit.links %} \ + ({% for link in commit.links %}[{{link.text}}]({{link.href}}) {% endfor -%})\ + {% endif %} + {% else -%} + - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }} + {% endif -%} + {% endfor -%} +{% endfor %} +""" + trim = true protect_breaking_commits = true sort_commits = "newest"