|
| 1 | +# configuration file for git-cliff (0.1.0) |
| 2 | + |
| 3 | +[changelog] |
| 4 | +# changelog header |
| 5 | +header = """ |
| 6 | +# Changelog\n |
| 7 | +All notable changes to this project will be documented in this file.\n |
| 8 | +""" |
| 9 | +# template for the changelog body |
| 10 | +# https://tera.netlify.app/docs/#introduction |
| 11 | +body = """ |
| 12 | +{% if version %}\ |
| 13 | + ## [{{ version | trim_start_matches(pat="v") }}] |
| 14 | +{% else %}\ |
| 15 | + ## [unreleased] |
| 16 | +{% endif %}\ |
| 17 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 18 | + ### {{ group | upper_first }} |
| 19 | + {% for commit in commits |
| 20 | + | filter(attribute="scope") |
| 21 | + | sort(attribute="scope") %} |
| 22 | + - {% if commit.breaking %}[**breaking**] {% endif %}_({{commit.scope}})_ {{ commit.message }} |
| 23 | + {%- endfor %} |
| 24 | + {% for commit in commits %} |
| 25 | + {%- if commit.scope -%} |
| 26 | + {% else -%} |
| 27 | + - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }} |
| 28 | + {% endif -%} |
| 29 | + {% endfor -%} |
| 30 | + {% raw %}{% endraw %}\ |
| 31 | +{% endfor %}\n |
| 32 | +""" |
| 33 | +# remove the leading and trailing whitespaces from the template |
| 34 | +trim = true |
| 35 | +# changelog footer |
| 36 | +footer = """ |
| 37 | +<!-- generated by git-cliff --> |
| 38 | +""" |
| 39 | + |
| 40 | +[git] |
| 41 | +# allow only conventional commits |
| 42 | +# https://www.conventionalcommits.org |
| 43 | +conventional_commits = true |
| 44 | +# filter out the commits that are not conventional |
| 45 | +filter_unconventional = true |
| 46 | +# regex for parsing and grouping commits |
| 47 | +commit_preprocessors = [ |
| 48 | + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/lunarvim/lunarvim/pull/${2}))" }, |
| 49 | +] |
| 50 | +commit_parsers = [ |
| 51 | + { message = "(.*[bB]ump)", group = "<!-- 7 --> Miscellaneous Tasks", skip = true }, |
| 52 | + { message = "^[bB]uild", group = "<!-- 0 --> Packaging" }, |
| 53 | + { message = "(^[fF]eat|^\\[Feat)", group = "<!-- 1 --> Features" }, |
| 54 | + { message = "(^[bB]ug|^[Ff]ix|^\\[Bug)", group = "<!-- 2 --> Bugfix" }, |
| 55 | + { message = "(^[rR]efactor|^ref)", group = "<!-- 3 --> Refactor" }, |
| 56 | + { message = "^[dD]oc", group = "<!-- 4 --> Documentation" }, |
| 57 | + { message = "^[rR]evert", group = "<!-- 5 --> Revert" }, |
| 58 | + { message = "^[pP]erf", group = "<!-- 6 --> Performance" }, |
| 59 | + { message = "^[cC]hore", group = "<!-- 7 --> Miscellaneous Tasks", skip = true }, |
| 60 | + { message = "^ci", group = "<!-- 7 --> Miscellaneous Tasks", skip = true }, |
| 61 | + { message = "^test", group = "<!-- 7 --> Miscellaneous Tasks", skip = true }, |
| 62 | + { message = "[wW]orkflow", group = "<!-- 7 --> Miscellaneous Tasks", skip = true }, |
| 63 | +] |
| 64 | +# filter out the commits that are not matched by commit parsers |
| 65 | +filter_commits = false |
| 66 | +# glob pattern for matching git tags |
| 67 | +tag_pattern = "v[0-9]*" |
| 68 | +# regex for skipping tags |
| 69 | +skip_tags = "v0.1.0-beta.1" |
| 70 | +# regex for ignoring tags |
| 71 | +ignore_tags = "" |
| 72 | +# sort the tags topologically |
| 73 | +topo_order = false |
| 74 | +# sort the commits inside sections by oldest/newest order |
| 75 | +sort_commits = "oldest" |
| 76 | +# protect breaking changes from being skipped due to matching a skipping commit_parser |
| 77 | +protect_breaking_commits = false |
| 78 | + |
| 79 | +[features] |
| 80 | +preserve_order = ["serde_json/preserve_order"] |
0 commit comments