Prevent error when submitting a merge request and pipeline is not defined
What does this MR do?
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
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?
- Changelog entry added
[ ] Documentation created/updated [ ] API support added
- Added for this feature/bug
- All builds are passing
- Conform by the merge request performance guides
- Conform by the style guides
Branch has no merge conflicts with
master(if it does - rebase it please)
- Squashed related commits together
What are the relevant issue numbers?
Closes #24860 (closed)