Skip to content

Commit f3ef230

Browse files
committed
fix: make bot filter compatible with git-cliff
1 parent 99dc053 commit f3ef230

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.gitcliff.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ No notable changes.
3131
{% set display_name = first_commit.author.name | default(value=author_name | default(value="Unknown")) %}
3232
{% set author_email = author_name | default(value="") | lower %}
3333
{% set author_label = display_name | lower %}
34-
{% if not (author_email | contains(pat="bot") or author_email | contains(pat="noreply") or author_label | contains(pat="bot")) %}
34+
{% set email_bot_parts = author_email | split(pat="bot") | length %}
35+
{% set label_bot_parts = author_label | split(pat="bot") | length %}
36+
{% set email_noreply_parts = author_email | split(pat="noreply") | length %}
37+
{% set is_bot = email_bot_parts > 1 or label_bot_parts > 1 %}
38+
{% set is_noreply = email_noreply_parts > 1 %}
39+
{% if not is_bot and not is_noreply %}
3540
- {{ display_name }} ({{ author_commits | length }} commit{% if author_commits | length > 1 %}s{% endif %})
3641
{% endif %}
3742
{% endfor %}

0 commit comments

Comments
 (0)