| 1 | [changelog] |
| 2 | trim = true |
| 3 | header = "" |
| 4 | footer = "" |
| 5 | body = """ |
| 6 | {% if version %}\ |
| 7 | ## v{{ version | trim_start_matches(pat="v") }} ({{ timestamp | date(format="%Y-%m-%d") }}) |
| 8 | {% else %}\ |
| 9 | ## [unreleased] |
| 10 | {% endif %}\ |
| 11 | {% raw %}\n{% endraw %}\ |
| 12 | |
| 13 | {%- for commit in commits | sort(attribute="group") %} |
| 14 | {%- if commit.scope -%} |
| 15 | {% else -%} |
| 16 | - **{{commit.group | striptags | trim | upper_first}}:** \ |
| 17 | {% if commit.breaking %} [**⚠️ breaking ⚠️**] {% endif %}\ |
| 18 | {{ commit.message | upper_first }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) |
| 19 | {% endif -%} |
| 20 | {% endfor -%} |
| 21 | |
| 22 | {% for scope, commits in commits | filter(attribute="group") | group_by(attribute="scope") %} |
| 23 | ### {{ scope | striptags | trim | upper_first }} |
| 24 | {% for commit in commits | sort(attribute="group") %} |
| 25 | - **{{commit.group | striptags | trim | upper_first}}:** \ |
| 26 | {% if commit.breaking %} [**⚠️ breaking ⚠️**] {% endif %}\ |
| 27 | {{ commit.message | upper_first }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) |
| 28 | {%- endfor -%} |
| 29 | {% raw %}\n{% endraw %}\ |
| 30 | {% endfor %} |
| 31 | """ |
| 32 | postprocessors = [ |
| 33 | { pattern = '\$REPO', replace = "https://github.com/watchexec/clearscreen" }, |
| 34 | ] |
| 35 | |
| 36 | [git] |
| 37 | conventional_commits = true |
| 38 | filter_unconventional = true |
| 39 | split_commits = true |
| 40 | protect_breaking_commits = true |
| 41 | filter_commits = true |
| 42 | tag_pattern = "v[0-9].*" |
| 43 | sort_commits = "oldest" |
| 44 | |
| 45 | link_parsers = [ |
| 46 | { pattern = "#(\\d+)", href = "https://github.com/watchexec/clearscreen/issues/$1"}, |
| 47 | { pattern = "RFC(\\d+)", text = "ietf-rfc$1", href = "https://datatracker.ietf.org/doc/html/rfc$1"}, |
| 48 | ] |
| 49 | |
| 50 | commit_parsers = [ |
| 51 | { message = "^feat", group = "Feature" }, |
| 52 | { message = "^fix", group = "Bugfix" }, |
| 53 | { message = "^tweak", group = "Tweak" }, |
| 54 | { message = "^doc", group = "Documentation" }, |
| 55 | { message = "^perf", group = "Performance" }, |
| 56 | { message = "^refactor", group = "Refactor" }, |
| 57 | { message = "^(draft|wip)", group = "WIP" }, |
| 58 | { message = "^style", group = "Style" }, |
| 59 | { message = "^test", group = "Test" }, |
| 60 | { message = "^deps", group = "Deps" }, |
| 61 | { message = "^Initial [cC]ommit$", skip = true }, |
| 62 | { message = "^repo", group = "Repo" }, |
| 63 | { message = "^(release|merge|fmt|chore|ci)", skip = true }, |
| 64 | { body = ".*breaking", group = "Breaking" }, |
| 65 | { body = ".*security", group = "Security" }, |
| 66 | { message = "^revert", group = "Revert" }, |
| 67 | ] |