|
| 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 | +# template for the changelog body |
| 12 | +# https://keats.github.io/tera/docs/#introduction |
| 13 | +body = """ |
| 14 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 15 | + ### {{ group | striptags | trim | upper_first }} |
| 16 | + {% for commit in commits %} |
| 17 | + - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ |
| 18 | + {% if commit.breaking %}[**breaking**] {% endif %}\ |
| 19 | + {{ commit.message | upper_first }}\ |
| 20 | + {% endfor %} |
| 21 | + {% endfor %} |
| 22 | +{% set breaking = (commits | filter(attribute="breaking", value=true) | map(attribute="breaking_description")) -%} |
| 23 | +{% if breaking -%} |
| 24 | + ### ⚠️ BREAKING CHANGES: |
| 25 | + {% for bk in breaking %} |
| 26 | + - {{ bk -}} |
| 27 | + {% endfor %} |
| 28 | +{% endif %} |
| 29 | +""" |
| 30 | +# template for the changelog footer |
| 31 | +footer = "" |
| 32 | +# remove the leading and trailing s |
| 33 | +trim = true |
| 34 | +# postprocessors |
| 35 | +postprocessors = [ |
| 36 | + # { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL |
| 37 | +] |
| 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 = false |
| 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 = "^doc", group = "<!-- 3 -->📚 Documentation" }, |
| 59 | + { message = "^perf", group = "<!-- 4 -->⚡ Performance" }, |
| 60 | + { message = "^refactor", group = "<!-- 2 -->🚜 Refactor" }, |
| 61 | + { message = "^style", group = "<!-- 5 -->🎨 Styling" }, |
| 62 | + { message = "^test", group = "<!-- 6 -->🧪 Testing" }, |
| 63 | + { message = "^chore\\(release\\): prepare for", skip = true }, |
| 64 | + { message = "^chore\\(deps.*\\)", skip = true }, |
| 65 | + { message = "^chore\\(pr\\)", skip = true }, |
| 66 | + { message = "^chore\\(pull\\)", skip = true }, |
| 67 | + { message = "^chore|^ci|^build\\(deps\\)", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" }, |
| 68 | + { body = ".*security", group = "<!-- 8 -->🛡️ Security" }, |
| 69 | + { message = "^revert", group = "<!-- 9 -->◀️ Revert" }, |
| 70 | +] |
| 71 | +# protect breaking changes from being skipped due to matching a skipping commit_parser |
| 72 | +protect_breaking_commits = false |
| 73 | +# filter out the commits that are not matched by commit parsers |
| 74 | +filter_commits = false |
| 75 | +# regex for matching git tags |
| 76 | +# tag_pattern = "v[0-9].*" |
| 77 | +# regex for skipping tags |
| 78 | +# skip_tags = "" |
| 79 | +# regex for ignoring tags |
| 80 | +# ignore_tags = "" |
| 81 | +# sort the tags topologically |
| 82 | +topo_order = false |
| 83 | +# sort the commits inside sections by oldest/newest order |
| 84 | +sort_commits = "oldest" |
| 85 | +# limit the number of commits included in the changelog. |
| 86 | +# limit_commits = 42 |
0 commit comments