Skip to content

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 with add_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?

What are the relevant issue numbers?

Fixes #24795 (closed)

/cc @adamniedzielski

Merge request reports