Skip to content

Prevent error when submitting a merge request and pipeline is not defined

What does this MR do?

It fixes undefined method 'size' for nil:NilClass error which happens when we submit a new merge request and there are pipelines for this branch but there is no pipeline for the latest commit. Since @statuses is only used to show the build count I changed it to @build_count.

This MR is a fix up for !7664 (merged) which is a fix up for !7568 (merged)

Are there points in the code the reviewer needs to double check?

It looks like this area of code resists changes, so general detailed check is much appreciated.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #24860 (closed)

Merge request reports