dmitri.shuralyov.com/website/gido/...

Check for nil GerritCL.Commit.

It happened once in the last 24 hours, but I haven't been able to
reproduce it since. Log it with details in case it happens again.

Updates https://golang.org/issue/21984.
dmitshur committed 1 year ago commit be9a001ef7a8c889e286d9b15233694ef6285f8f
service.go
@@ -216,10 +216,14 @@ func issuesAndChanges(repo *maintner.GitHubRepo, gerrit *maintner.Gerrit) map[st
 		root, ok := gerritProjects[proj.ServerSlashProject()]
 		if !ok {
 			return nil
 		}
 		err := proj.ForeachCLUnsorted(func(cl *maintner.GerritCL) error {
+			if cl.Commit == nil { // TODO: Fix golang.org/issue/21984.
+				log.Printf("cl.Commit is nil for CL number %d: %#v\n", cl.Number, cl)
+				return nil
+			}
 			if cl.Private || cl.Status == "" {
 				return nil
 			}
 			state, ok := clState(cl.Status)
 			if !ok {