|
| 1 | +[changelog] |
| 2 | +body = """ |
| 3 | +
|
| 4 | +## [{{ version }}]\ |
| 5 | + {%- if release_link -%}\ |
| 6 | + ({{ release_link }})\ |
| 7 | + {% endif %} \ |
| 8 | + - {{ timestamp | date(format="%Y-%m-%d") }} |
| 9 | +{% for group, commits in commits | group_by(attribute="group") %} |
| 10 | +### {{ group | upper_first }} |
| 11 | + {% for commit in commits %} |
| 12 | + {%- if commit.scope -%} |
| 13 | + - *({{commit.scope}})* {% if commit.breaking %}[**breaking**] {% endif %}\ |
| 14 | + {{ commit.message }}{{ self::username(commit=commit) }}\ |
| 15 | + {%- if commit.links %} \ |
| 16 | + ({% for link in commit.links %}[{{link.text}}]({{link.href}}) {% endfor -%})\ |
| 17 | + {% endif %} |
| 18 | + {% else -%} |
| 19 | + - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }}{{ self::username(commit=commit) }} |
| 20 | + {% endif -%} |
| 21 | + {% endfor -%} |
| 22 | +{% endfor %} |
| 23 | +{%- if remote.contributors %} |
| 24 | +### Contributors |
| 25 | +{% for contributor in remote.contributors %} |
| 26 | + * @{{ contributor.username }} |
| 27 | +{%- endfor %} |
| 28 | +{% endif -%} |
| 29 | +{%- macro username(commit) -%} |
| 30 | + {% if commit.remote.username %} (by @{{ commit.remote.username }}){% endif -%} |
| 31 | +{% endmacro -%} |
| 32 | +""" |
| 33 | + |
| 34 | +commit_parsers = [ |
| 35 | + { message = "^feat", group = "<!-- 0 -->π Features" }, |
| 36 | + { message = "^fix", group = "<!-- 1 -->π Bug Fixes" }, |
| 37 | + { message = "^refactor", group = "<!-- 2 -->π Refactor" }, |
| 38 | + { message = "^doc", group = "<!-- 3 -->π Documentation" }, |
| 39 | + { message = "^perf", group = "<!-- 4 -->β‘ Performance" }, |
| 40 | + { message = "^style", group = "<!-- 5 -->π¨ Styling" }, |
| 41 | + { message = "^test", group = "<!-- 6 -->π§ͺ Testing" }, |
| 42 | + { message = "^chore|^ci|^deps", skip = true }, |
| 43 | + { body = ".*security", group = "<!-- 7 -->π‘οΈ Security" }, |
| 44 | + { message = "^revert", group = "<!-- 8 -->βοΈ Revert" }, |
| 45 | + { message = ".*", group = "<!-- 9 -->πΌ Other" }, |
| 46 | +] |
0 commit comments