|
| 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 | +# changelog header |
| 10 | +header = """ |
| 11 | +# Changelog\n |
| 12 | +All notable changes to this project will be documented in this file.\n |
| 13 | +""" |
| 14 | +# template for the changelog body |
| 15 | +# https://keats.github.io/tera/docs/#introduction |
| 16 | +body = """ |
| 17 | +{% if version %}\ |
| 18 | + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 19 | +{% else %}\ |
| 20 | + ## [unreleased] |
| 21 | +{% endif %}\ |
| 22 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 23 | + ### {{ group | upper_first }} |
| 24 | + {% for commit in commits %} |
| 25 | + - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ |
| 26 | + {% endfor %} |
| 27 | +{% endfor %}\n |
| 28 | +""" |
| 29 | +# remove the leading and trailing whitespace from the template |
| 30 | +trim = true |
| 31 | +# changelog footer |
| 32 | +footer = """ |
| 33 | +<!-- generated by git-cliff --> |
| 34 | +""" |
| 35 | +# postprocessors |
| 36 | +postprocessors = [ |
| 37 | + # { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL |
| 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 | + # { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"}, # replace issue numbers |
| 49 | +] |
| 50 | +# regex for parsing and grouping commits |
| 51 | +commit_parsers = [ |
| 52 | + { message = "^feat", group = "Features" }, |
| 53 | + { message = "^fix", group = "Bug Fixes" }, |
| 54 | + { message = "^doc", group = "Documentation" }, |
| 55 | + { message = "^perf", group = "Performance" }, |
| 56 | + { message = "^refactor", group = "Refactor" }, |
| 57 | + { message = "^style", group = "Styling" }, |
| 58 | + { message = "^test", group = "Testing" }, |
| 59 | + { message = "^chore\\(release\\): prepare for", skip = true }, |
| 60 | + { message = "^chore\\(deps\\)", skip = true }, |
| 61 | + { message = "^chore\\(pr\\)", skip = true }, |
| 62 | + { message = "^chore\\(pull\\)", skip = true }, |
| 63 | + { message = "^chore|ci", group = "Miscellaneous Tasks" }, |
| 64 | + { body = ".*security", group = "Security" }, |
| 65 | + { message = "^revert", group = "Revert" }, |
| 66 | +] |
| 67 | +# protect breaking changes from being skipped due to matching a skipping commit_parser |
| 68 | +protect_breaking_commits = false |
| 69 | +# filter out the commits that are not matched by commit parsers |
| 70 | +filter_commits = false |
| 71 | +# regex for matching git tags |
| 72 | +tag_pattern = "v[0-9].*" |
| 73 | + |
| 74 | +# regex for skipping tags |
| 75 | +skip_tags = "v0.1.0-beta.1" |
| 76 | +# regex for ignoring tags |
| 77 | +ignore_tags = "" |
| 78 | +# sort the tags topologically |
| 79 | +topo_order = false |
| 80 | +# sort the commits inside sections by oldest/newest order |
| 81 | +sort_commits = "oldest" |
| 82 | +# limit the number of commits included in the changelog. |
| 83 | +# limit_commits = 42 |
0 commit comments