|
| 1 | +# configuration file for git-cliff |
| 2 | +# see https://github.com/orhun/git-cliff#configuration-file |
| 3 | + |
| 4 | +[changelog] |
| 5 | +# changelog header |
| 6 | +header = """ |
| 7 | +# Changelog\n |
| 8 | +All notable changes to this project will be documented in this file.\n |
| 9 | +""" |
| 10 | +# template for the changelog body |
| 11 | +# https://tera.netlify.app/docs/#introduction |
| 12 | +body = """ |
| 13 | +{% if version %}\ |
| 14 | + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 15 | +{% else %}\ |
| 16 | + ## [unreleased] |
| 17 | +{% endif %}\ |
| 18 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 19 | + ### {{ group | upper_first }} |
| 20 | + {% for commit in commits %} |
| 21 | + - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ |
| 22 | + {% endfor %} |
| 23 | +{% endfor %}\n |
| 24 | +""" |
| 25 | +# remove the leading and trailing whitespace from the template |
| 26 | +trim = true |
| 27 | +# changelog footer |
| 28 | +# footer = """ |
| 29 | +# <!-- generated by git-cliff --> |
| 30 | +# """ |
| 31 | + |
| 32 | +[git] |
| 33 | +# parse the commits based on https://www.conventionalcommits.org |
| 34 | +conventional_commits = true |
| 35 | +# filter out the commits that are not conventional |
| 36 | +filter_unconventional = true |
| 37 | +# process each line of a commit as an individual commit |
| 38 | +split_commits = false |
| 39 | +# regex for preprocessing the commit messages |
| 40 | +commit_preprocessors = [ |
| 41 | + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/BapRx/gsp/issues/${2}))" }, |
| 42 | +] |
| 43 | +# regex for parsing and grouping commits |
| 44 | +commit_parsers = [ |
| 45 | + { message = "^feat", group = "Features" }, |
| 46 | + { message = "^fix", group = "Bug Fixes" }, |
| 47 | + { message = "^doc", group = "Documentation" }, |
| 48 | + { message = "^perf", group = "Performance" }, |
| 49 | + { message = "^refactor", group = "Refactor" }, |
| 50 | + { message = "^style", group = "Styling" }, |
| 51 | + { message = "^test", group = "Testing" }, |
| 52 | + { message = "^chore\\(release\\): prepare for", skip = true }, |
| 53 | + { message = "^chore", group = "Miscellaneous Tasks" }, |
| 54 | + { message = "^ci", group = "CI/CD" }, |
| 55 | + { body = ".*security", group = "Security" }, |
| 56 | + { message = ".*", group = "Other", default_scope = "other" }, |
| 57 | +] |
| 58 | +# protect breaking changes from being skipped due to matching a skipping commit_parser |
| 59 | +protect_breaking_commits = false |
| 60 | +# filter out the commits that are not matched by commit parsers |
| 61 | +filter_commits = false |
| 62 | +# glob pattern for matching git tags |
| 63 | +tag_pattern = "v[0-9]*" |
| 64 | +# regex for skipping tags |
| 65 | +skip_tags = "v0.1.0-beta.1" |
| 66 | +# regex for ignoring tags |
| 67 | +ignore_tags = "" |
| 68 | +# sort the tags topologically |
| 69 | +topo_order = false |
| 70 | +# sort the commits inside sections by oldest/newest order |
| 71 | +sort_commits = "oldest" |
| 72 | +# limit the number of commits included in the changelog. |
| 73 | +# limit_commits = 42 |
0 commit comments