Skip to content

Commit fd98d34

Browse files
author
Laurent Guerard
committed
fix(release): 🐛 don't crash the changelog on an unresolved contributor
git-cliff's contributor template sorted github.contributors by username unconditionally; a contributor whose commit email doesn't resolve to a GitHub login gets username=null, and Tera's sort filter errors out on a null value ("Filter call 'sort' failed"), which crashed the v1.2.0 release job before the PyPI publish step could even run. Drop the sort (cosmetic ordering only) and skip rendering any contributor without a resolved username instead of crashing.
1 parent c1cbf39 commit fd98d34

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cliff.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ body = """
1111
{% if github.contributors | length > 0 %}
1212
### 👥 Contributors
1313
14-
{% for contributor in github.contributors | sort(attribute="username") %}\
15-
* @{{ contributor.username }}
14+
{% for contributor in github.contributors %}\
15+
{% if contributor.username %}* @{{ contributor.username }}
16+
{% endif %}\
1617
{% endfor %}
1718
{% endif %}\
1819
"""

0 commit comments

Comments
 (0)