From ed135c4139c1100dadcf5dba1041c701ccc011b1a116d17b130b405b90acfac8 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Fri, 16 Aug 2024 14:34:42 +0200 Subject: [PATCH] . --- obs-staging-bot/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/obs-staging-bot/main.go b/obs-staging-bot/main.go index 04595e4..9092460 100644 --- a/obs-staging-bot/main.go +++ b/obs-staging-bot/main.go @@ -135,8 +135,8 @@ func processBuildStatus(h *common.RequestHandler, project, refProject *common.Bu h.Log("comparing results %d vs. ref %d", len(project.Result), len(refProject.Result)) done: for i := 0; i < len(project.Result); i++ { - j := 0 h.Log("searching for %s/%s", project.Result[i].Repository, project.Result[i].Arch) + j := 0 for ; j < len(refProject.Result); j++ { if project.Result[i].Repository != refProject.Result[j].Repository || project.Result[i].Arch != refProject.Result[j].Arch { @@ -147,7 +147,7 @@ done: res := processRepoBuildStatus(h, project.Result[i].Status, refProject.Result[j].Status) switch res { case BuildStatusSummarySuccess: - if i-1 == len(project.Result) { + if i == len(project.Result)-1 { break done } break @@ -156,6 +156,7 @@ done: } } + h.Log("%d", j) if j >= len(refProject.Result) { h.LogError("Cannot find results... %#v \n %#v\n", project.Result[i], refProject.Result) return BuildStatusSummaryUnknown