diff --git a/cliff.toml b/cliff.toml index 9830dda..5bf1fcc 100644 --- a/cliff.toml +++ b/cliff.toml @@ -24,6 +24,13 @@ body = """ /{{ remote.gitea.owner }}/{{ remote.gitea.repo }} {%- endmacro -%} +{%- macro indent(text, prefix=" ") -%} + {%- set lines = text | split(pat="\n") -%} + {%- for l in lines -%} + {{ prefix ~ l }}{% if not loop.last %}{{ "\n" }}{% endif %} + {%- endfor -%} +{%- endmacro -%} + {% if version %}\ {% if previous.version %}\ ## [{{ version | trim_start_matches(pat="v") }}]\ @@ -40,6 +47,7 @@ body = """ {% if commit.merge_commit %}\ - 🔀 **{{ commit.message | upper_first }}** - \ ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\ + {% if commit.body %}\n{{ self::indent(text=commit.body, prefix=" ") }}{% endif %}\ {% if commit.extra and commit.extra.children %}\ {% for child in commit.extra.children %} {{ " " | safe }}- {% if child.scope %}*({{ child.scope }})* {% endif %}\