chore: Highlight new contributors in release notes #528
1 changed files with 13 additions and 1 deletions
14
cliff.toml
14
cliff.toml
|
@ -18,7 +18,19 @@ body = """
|
|||
{{ commit.message | upper_first }}\
|
||||
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif %}\
|
||||
{% endfor %}
|
||||
{% endfor %}\n
|
||||
{% endfor %}
|
||||
|
||||
{%- if gitea -%}
|
||||
{% if gitea.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
|
||||
### 🎉 New contributors
|
||||
{% endif %}\
|
||||
{% for contributor in gitea.contributors | filter(attribute="is_first_time", value=true) %}
|
||||
|
||||
- @{{ contributor.username }} made their first contribution \
|
||||
{%- if contributor.pr_number %} in #{{ contributor.pr_number }} \
|
||||
{% endif %}
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
\n
|
||||
"""
|
||||
# A Tera template to be rendered as the changelog's footer.
|
||||
# See https://keats.github.io/tera/docs/#introduction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue
The diff does looks sensible, but I wish there was a way to do a test release and see how it actually renders out. I guess we could actually create some sort of a UI test by running git-cliff on a pre-defined revision range, and checking if its new output (after a given PR) still makes sense
You can just run
git-cliff --latest
locally from the PR branch to see the result. It's what the CI runs for the release.Hmm I realize the heading is a bit too big (see the updated release notes for 0.13.0), I'll rather bring it to the same level as the commit categories.
Thanks for the tip! That's good to know