···359 repoMap[string(repos[i].RepoAt())] = &repos[i]
360 }
361362- for issueAt := range issueMap {
363- i := issueMap[issueAt]
364- r := repoMap[string(i.RepoAt)]
365- i.Repo = r
0000366 }
367368 // collect comments
···359 repoMap[string(repos[i].RepoAt())] = &repos[i]
360 }
361362+ for issueAt, i := range issueMap {
363+ if r, ok := repoMap[string(i.RepoAt)]; ok {
364+ i.Repo = r
365+ } else {
366+ // do not show up the issue if the repo is deleted
367+ // TODO: foreign key where?
368+ delete(issueMap, issueAt)
369+ }
370 }
371372 // collect comments