Refactor MergeRequest::BuildService
What does this MR do?
Refactor MergeRequest::BuildService
:
- add attribute
merge_request
to class to reduce parameters list of instance methods - add delegations to merge request to remove duplicated
merge_request.
getters - replace conditionals in
validate_branches
withadd_error
method - refactor
execute
method
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
See #24795 (closed)
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
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?
Fixes #24795 (closed)
/cc @adamniedzielski