Show gh username when no email present in authors icon list

This commit is contained in:
Mattias Granlund 2023-12-04 15:38:47 +01:00
parent 1a266f7bd1
commit 10f09dea6f
3 changed files with 5 additions and 5 deletions

View File

@ -6,8 +6,8 @@
<img
class="-ml-1 inline-block h-4 w-4 rounded-full first:ml-0"
title="Gravatar for {author.email}"
alt="Gravatar for {author.email}"
title="Gravatar for {author.email || author.name}"
alt="Gravatar for {author.email || author.name}"
srcset="{author.gravatarUrl} 2x"
width="100"
height="100"

View File

@ -45,8 +45,8 @@ export function ghResponseToInstance(
body: pr.body || undefined,
author: pr.user
? {
name: pr.user.login || 'unknown',
email: pr.user.email || 'unknown',
name: pr.user.login || undefined,
email: pr.user.email || undefined,
isBot: pr.user.type == 'bot',
gravatarUrl: new URL(pr.user.avatar_url)
}

View File

@ -102,7 +102,7 @@ export class RemoteFile {
export interface Author {
email?: string;
name: string;
name?: string;
gravatarUrl?: URL;
isBot?: boolean;
}