63 lines
1.9 KiB
TOML
Executable File
63 lines
1.9 KiB
TOML
Executable File
[changelog]
|
|
body = """
|
|
|
|
## Class Widgets 新版本!{% if version %}({{ version }}){%- endif -%}
|
|
{% for group, commits in commits | group_by(attribute="group") %}
|
|
|
|
### {{ group | upper_first }}
|
|
{% for commit in commits | unique(attribute="message") %}
|
|
- {% if commit.scope %}{{ commit.scope }}: {%- endif -%}{{ commit.message | upper_first }}\
|
|
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}
|
|
{% if commit.remote.pr_number %} in \
|
|
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
|
|
{%- endif %}
|
|
{% endfor %}
|
|
{%- endfor -%}
|
|
|
|
{%- if github -%}
|
|
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
|
|
{% raw %}\n{% endraw -%}
|
|
## 新贡献者
|
|
{%- endif %}\
|
|
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
|
|
* @{{ contributor.username }} {%- if contributor.pr_number %} 在
|
|
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
|
|
{%- endif %}\
|
|
第一次贡献
|
|
|
|
{%- endfor -%}
|
|
{%- endif -%}
|
|
|
|
{% if version %}
|
|
{% if previous.version %}
|
|
**Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
|
|
{% endif %}
|
|
{% else -%}
|
|
{% raw %}\n{% endraw %}
|
|
{% endif %}
|
|
|
|
{%- macro remote_url() -%}
|
|
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
|
|
{%- endmacro -%}
|
|
"""
|
|
trim = true
|
|
footer = "<!-- generated by git-cliff -->"
|
|
output = "CHANGELOG.md"
|
|
|
|
[git]
|
|
conventional_commits = true
|
|
filter_unconventional = true
|
|
split_commits = false
|
|
commit_parsers = [
|
|
{ message = "^feat", group = "新功能"},
|
|
{ message = "^fix", group = "Bug 修复"},
|
|
{ message = "^refactor", group = "重构"},
|
|
]
|
|
protect_breaking_commits = false
|
|
filter_commits = true
|
|
#tag_pattern = "v[0-9].*"
|
|
topo_order = false
|
|
sort_commits = "oldest"
|
|
link_parsers = []
|
|
limit_commits = 42
|