Commit 432018f8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use MR#source_project_path method instead of merge_request.source_project.path_with_namespace

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 7901d143
...@@ -36,7 +36,7 @@ module MergeRequestsHelper ...@@ -36,7 +36,7 @@ module MergeRequestsHelper
def merge_path_description(merge_request, separator) def merge_path_description(merge_request, separator)
if merge_request.for_fork? if merge_request.for_fork?
"Project:Branches: #{@merge_request.source_project.path_with_namespace}:#{@merge_request.source_branch} #{separator} #{@merge_request.target_project.path_with_namespace}:#{@merge_request.target_branch}" "Project:Branches: #{@merge_request.source_project_path}:#{@merge_request.source_branch} #{separator} #{@merge_request.target_project.path_with_namespace}:#{@merge_request.target_branch}"
else else
"Branches: #{@merge_request.source_branch} #{separator} #{@merge_request.target_branch}" "Branches: #{@merge_request.source_branch} #{separator} #{@merge_request.target_branch}"
end end
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
.span5 .span5
.clearfix .clearfix
.pull-left .pull-left
= f.select(:source_project_id,[[@merge_request.source_project.path_with_namespace,@merge_request.source_project.id]] , {}, {class: 'source_project chosen span3'}) = f.select(:source_project_id,[[@merge_request.source_project_path,@merge_request.source_project.id]] , {}, {class: 'source_project chosen span3'})
.pull-left .pull-left
&nbsp; &nbsp;
= f.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span2'}) = f.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span2'})
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
%span.pull-right %span.pull-right
- if merge_request.for_fork? - if merge_request.for_fork?
%span.light %span.light
= "#{merge_request.source_project.path_with_namespace}" = "#{merge_request.source_project_path}"
= "#{merge_request.source_branch}" = "#{merge_request.source_branch}"
%i.icon-angle-right.light %i.icon-angle-right.light
= "#{merge_request.target_branch}" = "#{merge_request.target_branch}"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
%strong Step 1. %strong Step 1.
Checkout target branch and get recent objects from GitLab Checkout target branch and get recent objects from GitLab
Assuming remote for #{@merge_request.target_project.path_with_namespace} is called #{target_remote} Assuming remote for #{@merge_request.target_project.path_with_namespace} is called #{target_remote}
remote for #{@merge_request.source_project.path_with_namespace} is called #{source_remote} remote for #{@merge_request.source_project_path} is called #{source_remote}
%pre.dark %pre.dark
:preserve :preserve
git checkout #{target_remote} #{@merge_request.target_branch} git checkout #{target_remote} #{@merge_request.target_branch}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
&nbsp; &nbsp;
-if @merge_request.for_fork? -if @merge_request.for_fork?
%span.label-branch %span.label-branch
%span.label-project= truncate(@merge_request.source_project.path_with_namespace, length: 25) %span.label-project= truncate(@merge_request.source_project_path, length: 25)
#{@merge_request.source_branch} #{@merge_request.source_branch}
&rarr; &rarr;
%span.label-branch= @merge_request.target_branch %span.label-branch= @merge_request.target_branch
......
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