dmitri.shuralyov.com/service/change/...

githubapi: Replace deleted user with a ghost account.
dmitshur committed 2 years ago commit a04563e0fb97d5fc16c3952356fc3e6d2a55d731
githubapi/githubapi.go
@@ -526,10 +526,22 @@ type githubqlActor struct {
 	AvatarURL string `graphql:"avatarUrl(size:96)"`
 	URL       string
 }
 
 func ghActor(actor githubqlActor) users.User {
+	if actor.User.DatabaseID == 0 {
+		// Deleted user, replace with https://github.com/ghost.
+		return users.User{
+			UserSpec: users.UserSpec{
+				ID:     10137,
+				Domain: "github.com",
+			},
+			Login:     "ghost",
+			AvatarURL: "https://avatars3.githubusercontent.com/u/10137?v=4",
+			HTMLURL:   "https://github.com/ghost",
+		}
+	}
 	return users.User{
 		UserSpec: users.UserSpec{
 			ID:     actor.User.DatabaseID,
 			Domain: "github.com",
 		},