Skip to content

Commit

Permalink
🐱 Never populate noreply emails from github appservice auth
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu authored Jun 19, 2024
1 parent c2ac80a commit a2654b3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ await resp.Content.ReadFromJsonAsync<Email[]>() is { Length: > 0 } emails)
if (options.Value.VerifiedOnly)
emails = emails.Where(x => x.verified).ToArray();

foreach (var email in emails)
// Never add the default noreply email to the claims.
foreach (var email in emails.Where(x => !x.email.EndsWith("noreply.github.com")))
{
// Don't duplicate the primary email.
if (primary?.Value != email.email)
Expand All @@ -169,4 +170,4 @@ await resp.Content.ReadFromJsonAsync<Email[]>() is { Length: > 0 } emails)

record Email(string email, bool verified);
}
}
}

0 comments on commit a2654b3

Please sign in to comment.