Update CI::Build#merge_request implementation
What does this MR do?
This MR updates the implementations of Ci::Build#merge_request
to align with the current implementation of the relationship between merge requests and merge request pipelines. The first commit updates the method specs and adds a case for each specific type of merge request pipeline, some of which fail. These failures are a bug opened as #212243 (closed). The second commit refactors Ci::Build
to directly use it's pipeline's first merge request as it's own.
This MR also contains the entirety of !27951 (merged), which was opened to support this refactor and should be merged before this.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry Documentation (if required)-
Code review guidelines -
Merge request performance guidelines -
Style guides Database guidesSeparation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. Tested in all supported browsersInformed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- ~~Label as security and @ mention
@gitlab-com/gl-security/appsec
~~ The MR includes necessary changes to maintain consistency between UI, API, email, or other methodsSecurity reports checked/validated by a reviewer from the AppSec team