From d8b1fe20a975070052b726e46c9fad2d512bfd16 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Mon, 13 Nov 2023 08:45:40 +0000 Subject: [PATCH] Defensive coding on summary Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index f07753c..438690d 100644 --- a/main.go +++ b/main.go @@ -243,7 +243,10 @@ func main() { log.Fatal(err) } - summary := repoSummary[owner+"/"+repo.GetName()] + summary, ok := repoSummary[repo.GetFullName()] + if !ok { + panic(fmt.Sprintf("no summary populated for: %s", repo.GetFullName())) + } for _, job := range jobs.Jobs { if !job.GetCompletedAt().IsZero() {