|
| 1 | +# configuration file for git-cliff (0.1.0) |
| 2 | + |
| 3 | +[changelog] |
| 4 | +# changelog header |
| 5 | +header = """ |
| 6 | +# Changelog |
| 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 | replace(from="v", to="") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 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 | + - *({{commit.scope}})* {{ commit.message | upper_first }} |
| 23 | + {%- if commit.breaking %} |
| 24 | + {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} |
| 25 | + {%- endif -%} |
| 26 | + {%- endfor -%} |
| 27 | + {%- for commit in commits %} |
| 28 | + {%- if commit.scope -%} |
| 29 | + {% else -%} |
| 30 | + - *(No Category)* {{ commit.message | upper_first }} |
| 31 | + {% if commit.breaking -%} |
| 32 | + {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} |
| 33 | + {% endif -%} |
| 34 | + {% endif -%} |
| 35 | + {% endfor -%} |
| 36 | +{% endfor %} |
| 37 | +""" |
| 38 | +# remove the leading and trailing whitespaces from the template |
| 39 | +trim = true |
| 40 | +# changelog footer |
| 41 | +footer = """ |
| 42 | +<!-- generated by git-cliff --> |
| 43 | +""" |
| 44 | + |
| 45 | +[git] |
| 46 | +# allow only conventional commits |
| 47 | +# https://www.conventionalcommits.org |
| 48 | +conventional_commits = true |
| 49 | +# regex for parsing and grouping commits |
| 50 | +commit_parsers = [ |
| 51 | + { message = "^feat", group = "Features"}, |
| 52 | + { message = "^fix", group = "Bug Fixes"}, |
| 53 | + { message = "^doc", group = "Documentation"}, |
| 54 | + { message = "^perf", group = "Performance"}, |
| 55 | + { message = "^refactor", group = "Refactor"}, |
| 56 | + { message = "^style", group = "Styling"}, |
| 57 | + { message = "^test", group = "Testing"}, |
| 58 | + { message = "^chore\\(release\\): prepare for", skip = true}, |
| 59 | + { message = "^chore", group = "Miscellaneous Tasks"}, |
| 60 | + { body = ".*security", group = "Security"}, |
| 61 | +] |
| 62 | +# filter out the commits that are not matched by commit parsers |
| 63 | +filter_commits = false |
| 64 | +# glob pattern for matching git tags |
| 65 | +tag_pattern = "[0-9]*" |
| 66 | +# regex for skipping tags |
| 67 | +skip_tags = "v0.1.0-beta.1" |
0 commit comments