Skip to content

Don't ignore the parameter of MergeRequestsHelper#mr_change_branches_path

What does this MR do?

Let MergeRequestsHelper#mr_change_branches_path use its parameter merge_request instead of @merge_request, thus making it not confusing.

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

mr_change_branches_path is called at _branch_chooser.html.haml L21:

= link_to 'Change branches', mr_change_branches_path(issuable)

_branch_chooser.html.haml is called by shared/issuable/_form.html.haml, which is called by projects/merge_requests/_form.html.haml

None of them has spec tests.

Why was this MR needed?

Make the code less confusing and fragile.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Merge request reports