Skip to content

Commit d8b1fe2

Browse files
committed
Defensive coding on summary
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent e6781a6 commit d8b1fe2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,10 @@ func main() {
243243
log.Fatal(err)
244244
}
245245

246-
summary := repoSummary[owner+"/"+repo.GetName()]
246+
summary, ok := repoSummary[repo.GetFullName()]
247+
if !ok {
248+
panic(fmt.Sprintf("no summary populated for: %s", repo.GetFullName()))
249+
}
247250

248251
for _, job := range jobs.Jobs {
249252
if !job.GetCompletedAt().IsZero() {

0 commit comments

Comments
 (0)