|
| 1 | +# git-cliff ~ configuration file |
| 2 | +# https://git-cliff.org/docs/configuration |
| 3 | + |
| 4 | +# [remote.github] |
| 5 | +# owner = "orhun" |
| 6 | +# repo = "git-cliff" |
| 7 | +# token = "" |
| 8 | + |
| 9 | +[changelog] |
| 10 | +# A Tera template to be rendered for each release in the changelog. |
| 11 | +# See https://keats.github.io/tera/docs/#introduction |
| 12 | +body = """ |
| 13 | +## What's Changed |
| 14 | +
|
| 15 | +{%- if version %} in {{ version }}{%- endif -%} |
| 16 | +{% for commit in commits %} |
| 17 | + {% if commit.remote.pr_title -%} |
| 18 | + {%- set commit_message = commit.remote.pr_title -%} |
| 19 | + {%- else -%} |
| 20 | + {%- set commit_message = commit.message -%} |
| 21 | + {%- endif -%} |
| 22 | + * {{ commit_message | split(pat="\n") | first | trim }}\ |
| 23 | + {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%} |
| 24 | + {% if commit.remote.pr_number %} in \ |
| 25 | + [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \ |
| 26 | + {%- endif %} |
| 27 | +{%- endfor -%} |
| 28 | +
|
| 29 | +{%- if github -%} |
| 30 | +{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} |
| 31 | + {% raw %}\n{% endraw -%} |
| 32 | + ## New Contributors |
| 33 | +{%- endif %}\ |
| 34 | +{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} |
| 35 | + * @{{ contributor.username }} made their first contribution |
| 36 | + {%- if contributor.pr_number %} in \ |
| 37 | + [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ |
| 38 | + {%- endif %} |
| 39 | +{%- endfor -%} |
| 40 | +{%- endif -%} |
| 41 | +
|
| 42 | +{% if version %} |
| 43 | + {% if previous.version %} |
| 44 | + **Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }} |
| 45 | + {% endif %} |
| 46 | +{% else -%} |
| 47 | + {% raw %}\n{% endraw %} |
| 48 | +{% endif %} |
| 49 | +
|
| 50 | +{%- macro remote_url() -%} |
| 51 | + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} |
| 52 | +{%- endmacro -%} |
| 53 | +""" |
| 54 | +# Remove leading and trailing whitespaces from the changelog's body. |
| 55 | +trim = true |
| 56 | +# A Tera template to be rendered as the changelog's footer. |
| 57 | +# See https://keats.github.io/tera/docs/#introduction |
| 58 | +footer = """ |
| 59 | +<!-- generated by git-cliff --> |
| 60 | +""" |
| 61 | +# An array of regex based postprocessors to modify the changelog. |
| 62 | +# Replace the placeholder `<REPO>` with a URL. |
| 63 | +postprocessors = [] |
| 64 | + |
| 65 | +[git] |
| 66 | +# Parse commits according to the conventional commits specification. |
| 67 | +# See https://www.conventionalcommits.org |
| 68 | +conventional_commits = false |
| 69 | +# Exclude commits that do not match the conventional commits specification. |
| 70 | +filter_unconventional = true |
| 71 | +# Split commits on newlines, treating each line as an individual commit. |
| 72 | +split_commits = false |
| 73 | +# An array of regex based parsers to modify commit messages prior to further processing. |
| 74 | +commit_preprocessors = [{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }] |
| 75 | +# Exclude commits that are not matched by any commit parser. |
| 76 | +filter_commits = false |
| 77 | +# Order releases topologically instead of chronologically. |
| 78 | +topo_order = false |
| 79 | +# Order of commits in each group/release within the changelog. |
| 80 | +# Allowed values: newest, oldest |
| 81 | +sort_commits = "newest" |
0 commit comments