Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tagbot/action/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,15 @@ def _custom_release_notes(self, version_tag: str) -> Optional[str]:
def _format_user(self, user: Optional[NamedUser]) -> Dict[str, object]:
"""Format a user for the template."""
if user:
# Fetching `user.name` for the Copilot bot fails, so it needs to be
# special-cased.
name = (
"Copilot"
if (user.login == "Copilot" and user.type == "Bot")
else (user.name or user.login)
)
return {
"name": user.name or user.login,
"name": name,
"url": user.html_url,
"username": user.login,
}
Expand Down
Loading