File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -126,12 +126,17 @@ let set_repo_pipeline_status { state } (n : Github_t.status_notification) =
126
126
in
127
127
IntMap. remove build_number builds_map
128
128
|> IntMap. filter (fun build_number' build_status ->
129
- match build_status.State_t. failed_steps with
130
- (* Remove old builds without failed steps because they were fixed and cleaned from state *)
131
- | [] when build_number' < build_number && build_status.is_finished -> false
132
- (* Remove builds that ran for more than the threshold or for which we didn't get an end notification *)
133
- | _ when is_past_threshold build_status threshold -> false
134
- | _ -> true ))
129
+ match build_status.State_t. is_finished, build_number' < build_number with
130
+ | true , true ->
131
+ (* remove all finished older builds *)
132
+ false
133
+ | false , true when is_past_threshold build_status threshold ->
134
+ (* remove older builds that ran for longer than the threshold,
135
+ or for which we might not have received a final notification *)
136
+ false
137
+ | _ ->
138
+ (* keep all other builds *)
139
+ true ))
135
140
in
136
141
let rm_successful_step =
137
142
update_builds_in_branches ~branches: n.branches ~f: (fun builds_map ->
You can’t perform that action at this time.
0 commit comments