|
| 1 | +# git-cliff ~ default configuration file |
| 2 | +# https://git-cliff.org/docs/configuration |
| 3 | +# |
| 4 | +# Lines starting with "#" are comments. |
| 5 | +# Configuration options are organized into tables and keys. |
| 6 | +# See documentation for more information on available options. |
| 7 | + |
| 8 | +[changelog] |
| 9 | +# template for the changelog header |
| 10 | +header = """ |
| 11 | +# Changelog\n |
| 12 | +All notable changes to this project will be documented in this file.\n |
| 13 | +Breaking changes are annotated with the ⚠️ symbol. |
| 14 | +""" |
| 15 | +# template for the changelog body |
| 16 | +# https://keats.github.io/tera/docs/#introduction |
| 17 | +body = """ |
| 18 | +{% if version %}\ |
| 19 | + ## {{version}} - {{ timestamp | date(format="%Y-%m-%d") }} |
| 20 | +{% else %}\ |
| 21 | + ## [unreleased] |
| 22 | +{% endif %}\ |
| 23 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 24 | + ### {{ group | striptags | trim | upper_first }} |
| 25 | + {% for commit in commits %} |
| 26 | + - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ |
| 27 | + {% if commit.breaking %}⚠️ {% endif %}\ |
| 28 | + {{ commit.message | upper_first }}\ |
| 29 | + {% endfor %} |
| 30 | +{% endfor %}\n |
| 31 | +""" |
| 32 | +# template for the changelog footer |
| 33 | +footer = """ |
| 34 | +<!-- generated by git-cliff --> |
| 35 | +""" |
| 36 | +# remove the leading and trailing s |
| 37 | +trim = true |
| 38 | + |
| 39 | +[git] |
| 40 | +# parse the commits based on https://www.conventionalcommits.org |
| 41 | +conventional_commits = true |
| 42 | +# filter out the commits that are not conventional |
| 43 | +filter_unconventional = true |
| 44 | +# process each line of a commit as an individual commit |
| 45 | +split_commits = false |
| 46 | +# regex for preprocessing the commit messages |
| 47 | +commit_preprocessors = [ |
| 48 | + # Replace issue numbers |
| 49 | + #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"}, |
| 50 | + # Check spelling of the commit with https://github.com/crate-ci/typos |
| 51 | + # If the spelling is incorrect, it will be automatically fixed. |
| 52 | + #{ pattern = '.*', replace_command = 'typos --write-changes -' }, |
| 53 | +] |
| 54 | +# regex for parsing and grouping commits |
| 55 | +commit_parsers = [ |
| 56 | + { message = "^feat", group = "<!-- 0 -->🚀 Features" }, |
| 57 | + { message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" }, |
| 58 | + { message = "^k8s", group = "<!-- 4 -->☸️ Kubernetes" } |
| 59 | +] |
| 60 | +# filter out the commits that are not matched by commit parsers |
| 61 | +filter_commits = true |
| 62 | +# sort the tags topologically |
| 63 | +topo_order = false |
| 64 | +# sort the commits inside sections by oldest/newest order |
| 65 | +sort_commits = "oldest" |
0 commit comments