|
| 1 | +[changelog] |
| 2 | +header = """ |
| 3 | +# Changelog\n |
| 4 | +All notable changes to this project will be documented in this file.\n |
| 5 | +""" |
| 6 | + |
| 7 | +body = """ |
| 8 | +{% if version %}\ |
| 9 | + {% if previous.version %}\ |
| 10 | + # [{{ version | trim_start_matches(pat="v") }}](https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/compare/{{ previous.version }}...{{ version }}) ({{ timestamp | date(format="%Y-%m-%d") }}) |
| 11 | + {% else %}\ |
| 12 | + # [{{ version | trim_start_matches(pat="v") }}] ({{ timestamp | date(format="%Y-%m-%d") }}) |
| 13 | + {% endif %}\ |
| 14 | +{% else %}\ |
| 15 | + # [unreleased] |
| 16 | +{% endif %}\ |
| 17 | +
|
| 18 | +{% macro group_commits(group_name) %}\ |
| 19 | + {% for group, commits in commits | group_by(attribute="group") %}\ |
| 20 | + {% if group == group_name %}\ |
| 21 | + ### {{ group | upper_first }} |
| 22 | +
|
| 23 | + {% for commit in commits %}\ |
| 24 | + * {% if commit.scope %}**{{ commit.scope }}:** {% endif %}\ |
| 25 | + {% if commit.breaking %}[**breaking**] {% endif %}\ |
| 26 | + {{ commit.message }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/commit/{{ commit.id }})) \ |
| 27 | + [@{{ commit.author.name }}](https://github.com/{{ commit.author.name }}) |
| 28 | + {% endfor %} |
| 29 | +
|
| 30 | + {% endif %}\ |
| 31 | + {% endfor %}\ |
| 32 | +{% endmacro %}\ |
| 33 | +
|
| 34 | +{{ self::group_commits(group_name="Bug Fixes") }}\ |
| 35 | +{{ self::group_commits(group_name="Features") }}\ |
| 36 | +{{ self::group_commits(group_name="Performance") }}\ |
| 37 | +{{ self::group_commits(group_name="Refactor") }}\ |
| 38 | +{{ self::group_commits(group_name="Testing") }}\ |
| 39 | +{{ self::group_commits(group_name="DevOps") }}\ |
| 40 | +{{ self::group_commits(group_name="Documentation") }}\ |
| 41 | +{{ self::group_commits(group_name="Styling") }}\ |
| 42 | +{{ self::group_commits(group_name="Miscellaneous Tasks") }}\ |
| 43 | +{{ self::group_commits(group_name="Security") }}\ |
| 44 | +{{ self::group_commits(group_name="Revert") }}\ |
| 45 | +\n |
| 46 | +""" |
| 47 | + |
| 48 | +footer = """ |
| 49 | +<!-- Generated by git-cliff. --> |
| 50 | +""" |
| 51 | + |
| 52 | +trim = true |
| 53 | +postprocessors = [] |
| 54 | + |
| 55 | + |
| 56 | +[git] |
| 57 | +conventional_commits = true |
| 58 | +filter_unconventional = true |
| 59 | +split_commits = false |
| 60 | +commit_preprocessors = [ |
| 61 | + { pattern = '^Revert "(.+)"$', replace = "revert $1" }, |
| 62 | +] |
| 63 | + |
| 64 | +commit_parsers = [ |
| 65 | + { message = "^fix", group = "Bug Fixes" }, |
| 66 | + { message = "^feat", group = "Features" }, |
| 67 | + { message = "^perf", group = "Performance" }, |
| 68 | + { message = "^refactor", group = "Refactor" }, |
| 69 | + { message = "^test", group = "Testing" }, |
| 70 | + { message = "^ci", group = "DevOps" }, |
| 71 | + { message = "^doc", group = "Documentation" }, |
| 72 | + { message = "^style", group = "Styling" }, |
| 73 | + { message = "^chore\\(release\\): prepare for", skip = true }, |
| 74 | + { message = "^chore\\(deps.*\\)", skip = true }, |
| 75 | + { message = "^chore\\(pr\\)", skip = true }, |
| 76 | + { message = "^chore\\(pull\\)", skip = true }, |
| 77 | + { message = "^chore", group = "Miscellaneous Tasks" }, |
| 78 | + { body = ".*security", group = "Security" }, |
| 79 | + { message = "^[Rr]evert", group = "Revert" }, |
| 80 | +] |
| 81 | + |
| 82 | +protect_breaking_commits = false |
| 83 | +filter_commits = false |
| 84 | +topo_order = false |
| 85 | +sort_commits = "oldest" |
0 commit comments