Commit dc4b3dd0 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix source_project and also pass source_project

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747556
parent 26af4b5a
...@@ -6,12 +6,12 @@ module CreatesCommit ...@@ -6,12 +6,12 @@ module CreatesCommit
source_branch = @ref if @ref && @repository.find_branch(@ref) source_branch = @ref if @ref && @repository.find_branch(@ref)
commit_params = @commit_params.merge( commit_params = @commit_params.merge(
source_project: @project, source_project: @tree_edit_project,
source_branch: source_branch, source_branch: source_branch,
target_branch: @target_branch target_branch: @target_branch
) )
result = service.new(@tree_edit_project, current_user, commit_params).execute result = service.new(@project, current_user, commit_params).execute
if result[:status] == :success if result[:status] == :success
update_flash_notice(success_notice) update_flash_notice(success_notice)
......
...@@ -37,6 +37,7 @@ module Commits ...@@ -37,6 +37,7 @@ module Commits
@commit, @commit,
into, into,
tree_id, tree_id,
source_project: @source_project,
source_branch_name: @target_branch) source_branch_name: @target_branch)
success success
......
...@@ -8,6 +8,7 @@ module Files ...@@ -8,6 +8,7 @@ module Files
branch_name: @target_branch, branch_name: @target_branch,
author_email: @author_email, author_email: @author_email,
author_name: @author_name, author_name: @author_name,
source_project: @source_project,
source_branch_name: @source_branch) source_branch_name: @source_branch)
end end
......
...@@ -10,6 +10,7 @@ module Files ...@@ -10,6 +10,7 @@ module Files
update: false, update: false,
author_email: @author_email, author_email: @author_email,
author_name: @author_name, author_name: @author_name,
source_project: @source_project,
source_branch_name: @source_branch) source_branch_name: @source_branch)
end end
......
...@@ -8,6 +8,7 @@ module Files ...@@ -8,6 +8,7 @@ module Files
branch_name: @target_branch, branch_name: @target_branch,
author_email: @author_email, author_email: @author_email,
author_name: @author_name, author_name: @author_name,
source_project: @source_project,
source_branch_name: @source_branch) source_branch_name: @source_branch)
end end
end end
......
...@@ -10,6 +10,7 @@ module Files ...@@ -10,6 +10,7 @@ module Files
actions: params[:actions], actions: params[:actions],
author_email: @author_email, author_email: @author_email,
author_name: @author_name, author_name: @author_name,
source_project: @source_project,
source_branch_name: @source_branch source_branch_name: @source_branch
) )
end end
......
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