diff --git a/obs-staging-bot/main.go b/obs-staging-bot/main.go index e23f811..5aa5160 100644 --- a/obs-staging-bot/main.go +++ b/obs-staging-bot/main.go @@ -132,6 +132,7 @@ func processBuildStatus(h *common.RequestHandler, project, refProject *common.Bu slices.SortFunc(refProject.Result, BuildResultSorter) + done: for i := 0; i < len(project.Result); i++ { j := 0 for ; j < len(refProject.Result); j++ { @@ -144,6 +145,9 @@ func processBuildStatus(h *common.RequestHandler, project, refProject *common.Bu res := processRepoBuildStatus(h, project.Result[i].Status, refProject.Result[j].Status) switch res { case BuildStatusSummarySuccess: + if i-1 == len(project.Result) { + break done + } break default: return res