This commit is contained in:
Adam Majer 2024-08-16 14:39:20 +02:00
parent 4fdf91a1ec
commit 001fdd4ebf

View File

@ -133,10 +133,10 @@ func processBuildStatus(h *common.RequestHandler, project, refProject *common.Bu
slices.SortFunc(refProject.Result, BuildResultSorter)
h.Log("comparing results %d vs. ref %d", len(project.Result), len(refProject.Result))
done:
for i := 0; i < len(project.Result); i++ {
h.Log("searching for %s/%s", project.Result[i].Repository, project.Result[i].Arch)
j := 0
found:
for ; j < len(refProject.Result); j++ {
if project.Result[i].Repository != refProject.Result[j].Repository ||
project.Result[i].Arch != refProject.Result[j].Arch {
@ -147,10 +147,7 @@ done:
res := processRepoBuildStatus(h, project.Result[i].Status, refProject.Result[j].Status)
switch res {
case BuildStatusSummarySuccess:
if i == len(project.Result)-1 {
break done
}
break
break found
default:
return res
}