Commit 5a4386a4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Render valid message when MR source or target branch was removed

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 405694a5
......@@ -2,7 +2,10 @@
= render "projects/merge_requests/show/mr_title"
= render "projects/merge_requests/show/how_to_merge"
= render "projects/merge_requests/show/mr_box"
- if @merge_request.source_branch_exists? && @merge_request.target_branch_exists?
= render "projects/merge_requests/show/mr_accept"
- else
= render "projects/merge_requests/show/no_accept"
- if @merge_request.source_project.gitlab_ci?
= render "projects/merge_requests/show/mr_ci"
= render "projects/merge_requests/show/commits"
......
.alert.alert-error
%p
This merge request can not be accepted because branch
- unless @merge_request.source_branch_exists?
%span.label.label-inverse= @merge_request.source_branch
does not exist in
%span.label.label-info= @merge_request.source_project_path
- else
%span.label.label-inverse= @merge_request.target_branch
does not exist in
%span.label.label-info= @merge_request.target_project_path
%strong Please close this merge request or change branches with existing one
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment