From 5474978f8aa72112595e342864138b9b14fb6366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sat, 24 Aug 2024 10:59:08 +0300 Subject: [PATCH] chore(config): include new contributors in repository changelog --- cliff.toml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/cliff.toml b/cliff.toml index c529d41961..fca00cd1b2 100644 --- a/cliff.toml +++ b/cliff.toml @@ -5,6 +5,10 @@ # Configuration options are organized into tables and keys. # See documentation for more information on available options. +[remote.github] +owner = "orhun" +repo = "git-cliff" + [changelog] # template for the changelog header header = """ @@ -48,7 +52,19 @@ body = """ {{ self::print_commit(commit=commit) }} {% endif -%} {% endfor -%} -{% endfor %}\n +{% endfor -%} +{%- if github -%} +{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} + ## New Contributors ❤️ +{% endif %}\ +{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} + * @{{ contributor.username }} made their first contribution + {%- if contributor.pr_number %} in \ + [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ + {%- endif %} +{%- endfor -%} +{%- endif %} +{% raw %}\n{% endraw -%} """ # template for the changelog footer footer = """