|
| 1 | +# git-cliff ~ configuration file |
| 2 | +# https://git-cliff.org/docs/configuration |
| 3 | + |
| 4 | + |
| 5 | +[changelog] |
| 6 | +# A Tera template to be rendered for each release in the changelog. |
| 7 | +# See https://keats.github.io/tera/docs/#introduction |
| 8 | +body = """ |
| 9 | +{% if version %}\ |
| 10 | + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 11 | +{% else %}\ |
| 12 | + ## [unreleased] |
| 13 | +{% endif %}\ |
| 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 | +""" |
| 23 | +# Remove leading and trailing whitespaces from the changelog's body. |
| 24 | +trim = true |
| 25 | +# An array of regex based postprocessors to modify the changelog. |
| 26 | +postprocessors = [ |
| 27 | + # Replace the placeholder <REPO> with a URL. |
| 28 | + #{ pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, |
| 29 | +] |
| 30 | +# render body even when there are no releases to process |
| 31 | +# render_always = true |
| 32 | +# output file path |
| 33 | +# output = "test.md" |
| 34 | + |
| 35 | +protect_breaking_commits = false |
| 36 | +# An array of regex based parsers for extracting data from the commit message. |
| 37 | +# Assigns commits to groups. |
| 38 | +# Optionally sets the commit's scope and can decide to exclude commits from further processing. |
| 39 | +commit_parsers = [ |
| 40 | + { message = "^feat", group = "<!-- 0 -->Features" }, |
| 41 | + { message = "^fix", group = "<!-- 1 -->Bug Fixes" }, |
| 42 | + { message = "^doc", group = "<!-- 3 -->Documentation" }, |
| 43 | + { message = "^perf", group = "<!-- 4 -->Performance" }, |
| 44 | + { message = "^refactor", group = "<!-- 2 -->Refactor" }, |
| 45 | + { message = "^style", group = "<!-- 5 -->Styling" }, |
| 46 | + { message = "^test", group = "<!-- 6 -->Testing" }, |
| 47 | + { message = "^chore\\(release\\): prepare for", skip = true }, |
| 48 | + { message = "^chore\\(deps.*\\)", skip = true }, |
| 49 | + { message = "^chore\\(pr\\)", skip = true }, |
| 50 | + { message = "^chore\\(pull\\)", skip = true }, |
| 51 | + { message = "^chore|^ci", group = "<!-- 7 -->Miscellaneous Tasks" }, |
| 52 | + { body = ".*security", group = "<!-- 8 -->Security" }, |
| 53 | + { message = "^revert", group = "<!-- 9 -->Revert" }, |
| 54 | + { message = ".*", group = "<!-- 10 -->Other" }, |
| 55 | +] |
0 commit comments