Skip to content

Commit

Permalink
Defensive coding on summary
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Nov 13, 2023
1 parent e6781a6 commit d8b1fe2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit d8b1fe2

Please sign in to comment.