diff --git a/cliff.toml b/cliff.toml index b5b8c3f16..544d59eed 100644 --- a/cliff.toml +++ b/cliff.toml @@ -7,22 +7,22 @@ repo = "lemmy" # token = "" [changelog] -# template for the changelog body -# https://keats.github.io/tera/docs/#introduction +# A Tera template to be rendered for each release in the changelog. +# See https://keats.github.io/tera/docs/#introduction body = """ ## What's Changed {%- if version %} in {{ version }}{%- endif -%} {% for commit in commits %} - {% if commit.github.pr_title -%} - {%- set commit_message = commit.github.pr_title -%} + {% if commit.remote.pr_title -%} + {%- set commit_message = commit.remote.pr_title -%} {%- else -%} {%- set commit_message = commit.message -%} {%- endif -%} * {{ commit_message | split(pat="\n") | first | trim }}\ - {% if commit.github.username %} by @{{ commit.github.username }}{%- endif -%} - {% if commit.github.pr_number %} in \ - [#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \ + {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%} + {% if commit.remote.pr_number %} in \ + [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \ {%- endif %} {%- endfor -%} @@ -51,39 +51,32 @@ body = """ https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} """ -# remove the leading and trailing whitespace from the template +# Remove leading and trailing whitespaces from the changelog's body. trim = true -# changelog footer +# A Tera template to be rendered as the changelog's footer. +# See https://keats.github.io/tera/docs/#introduction footer = """ """ -# postprocessors +# An array of regex based postprocessors to modify the changelog. +# Replace the placeholder `` with a URL. postprocessors = [] [git] -# parse the commits based on https://www.conventionalcommits.org +# Parse commits according to the conventional commits specification. +# See https://www.conventionalcommits.org conventional_commits = false -# filter out the commits that are not conventional +# Exclude commits that do not match the conventional commits specification. filter_unconventional = true -# process each line of a commit as an individual commit +# Split commits on newlines, treating each line as an individual commit. split_commits = false -# regex for preprocessing the commit messages -commit_preprocessors = [ - # remove issue numbers from commits - { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }, -] +# An array of regex based parsers to modify commit messages prior to further processing. +commit_preprocessors = [{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }] +# Exclude commits that are not matched by any commit parser. commit_parsers = [{ field = "author.name", pattern = "renovate", skip = true }] -# protect breaking changes from being skipped due to matching a skipping commit_parser -protect_breaking_commits = false -# filter out the commits that are not matched by commit parsers filter_commits = false -# regex for matching git tags -tag_pattern = "[0-9].*" -# regex for skipping tags -skip_tags = "beta|alpha" -# regex for ignoring tags -ignore_tags = "rc" -# sort the tags topologically +# Order releases topologically instead of chronologically. topo_order = false -# sort the commits inside sections by oldest/newest order +# Order of commits in each group/release within the changelog. +# Allowed values: newest, oldest sort_commits = "newest"