Skip to content

Commit f81d32b

Browse files
authored
Fall back to GitHub handle if name is empty (#9)
Signed-off-by: Adrian Macneil <adrian@foxglove.dev>
1 parent 780da42 commit f81d32b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ros_github_scripts/generate_contribution_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def format_github_time_to_date(value: str) -> str:
135135
def line_format_contribution(node: dict) -> str:
136136
"""Format an individual GitHub PR into our contribution line format."""
137137
title = node['title']
138-
author = node['author'].get('name')
138+
author = node['author'].get('name') or node['author'].get('login')
139139
link = node['permalink']
140140
merged = format_github_time_to_date(node['mergedAt'])
141141
return f'[{title}]({link}) - {author} (merged {merged})'

0 commit comments

Comments
 (0)