|
| 1 | +# git-cliff ~ configuration file |
| 2 | +# https://git-cliff.org/docs/configuration |
| 3 | + |
| 4 | +[changelog] |
| 5 | +# A Tera template to be rendered as the changelog's header. |
| 6 | +# See https://keats.github.io/tera/docs/#introduction |
| 7 | +header = """ |
| 8 | +<!-- generated by `git cliff -u -p CHANGELOG.md` and edited to set version --> |
| 9 | +# Changelog\n |
| 10 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 11 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n |
| 12 | +""" |
| 13 | +# A Tera template to be rendered for each release in the changelog. |
| 14 | +# See https://keats.github.io/tera/docs/#introduction |
| 15 | +body = """ |
| 16 | +{% if version -%} |
| 17 | + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 18 | +{% else -%} |
| 19 | + ## [Unreleased] |
| 20 | +{% endif -%} |
| 21 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 22 | + ### {{ group | upper_first }} |
| 23 | + {% for commit in commits %} |
| 24 | + - {{ commit.message | split(pat="\n") | first | upper_first | trim }}\ |
| 25 | + {% endfor %} |
| 26 | +{% endfor %}\n |
| 27 | +""" |
| 28 | +# A Tera template to be rendered as the changelog's footer. |
| 29 | +# See https://keats.github.io/tera/docs/#introduction |
| 30 | +footer = """ |
| 31 | +{% for release in releases -%} |
| 32 | + {% if release.version -%} |
| 33 | + {% if release.previous.version -%} |
| 34 | + [{{ release.version | trim_start_matches(pat="v") }}]: \ |
| 35 | + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\ |
| 36 | + /compare/{{ release.previous.version }}..{{ release.version }} |
| 37 | + {% endif -%} |
| 38 | + {% else -%} |
| 39 | + [unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\ |
| 40 | + /compare/{{ release.previous.version }}..HEAD |
| 41 | + {% endif -%} |
| 42 | +{% endfor %} |
| 43 | +<!-- generated by git-cliff --> |
| 44 | +""" |
| 45 | +# Remove leading and trailing whitespaces from the changelog's body. |
| 46 | +trim = true |
| 47 | + |
| 48 | +[git] |
| 49 | +# Parse commits according to the conventional commits specification. |
| 50 | +# See https://www.conventionalcommits.org |
| 51 | +conventional_commits = true |
| 52 | +# Exclude commits that do not match the conventional commits specification. |
| 53 | +filter_unconventional = false |
| 54 | +# An array of regex based parsers for extracting data from the commit message. |
| 55 | +# Assigns commits to groups. |
| 56 | +# Optionally sets the commit's scope and can decide to exclude commits from further processing. |
| 57 | +commit_parsers = [ |
| 58 | + { message = "^[a|A]dd", group = "Added" }, |
| 59 | + { message = "^[s|S]upport", group = "Added" }, |
| 60 | + { message = "^[r|R]emove", group = "Removed" }, |
| 61 | + { message = "^[Cc][Ii]:", group = "Other" }, |
| 62 | + { message = "clippy", group = "Other" }, |
| 63 | + { message = "^.*: add", group = "Added" }, |
| 64 | + { message = "^.*: support", group = "Added" }, |
| 65 | + { message = "^.*: remove", group = "Removed" }, |
| 66 | + { message = "^.*: delete", group = "Removed" }, |
| 67 | + { message = "^test", group = "Fixed" }, |
| 68 | + { message = "^[f|F]ix", group = "Fixed" }, |
| 69 | + { message = "^.*: fix", group = "Fixed" }, |
| 70 | + { message = "^.*", group = "Changed" }, |
| 71 | +] |
| 72 | +# Prevent commits that are breaking from being excluded by commit parsers. |
| 73 | +filter_commits = false |
| 74 | +# glob pattern for matching git tags |
| 75 | +tag_pattern = "pcap-parser-[0-9]*" |
| 76 | +# regex for skipping tags |
| 77 | +skip_tags = ".*-rc|.*-alpha|.*-beta" |
| 78 | +# regex for ignoring tags |
| 79 | +ignore_tags = "" |
| 80 | +# Order releases topologically instead of chronologically. |
| 81 | +topo_order = false |
| 82 | +# Order of commits in each group/release within the changelog. |
| 83 | +# Allowed values: newest, oldest |
| 84 | +sort_commits = "oldest" |
0 commit comments