diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-12-14 01:47:17 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-12-14 01:47:17 +0800 |
commit | dc4b3dd0ae5d6e0b55ba6723e5deff6eee127409 (patch) | |
tree | 8302a15b41e700c8a423b254092fd2554cde91d3 | |
parent | 26af4b5a61d5cdaffa7769336f40cd0861f6b1d4 (diff) | |
download | gitlab-ce-dc4b3dd0ae5d6e0b55ba6723e5deff6eee127409.tar.gz |
Fix source_project and also pass source_project
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747556
-rw-r--r-- | app/controllers/concerns/creates_commit.rb | 4 | ||||
-rw-r--r-- | app/services/commits/change_service.rb | 1 | ||||
-rw-r--r-- | app/services/files/create_dir_service.rb | 1 | ||||
-rw-r--r-- | app/services/files/create_service.rb | 1 | ||||
-rw-r--r-- | app/services/files/delete_service.rb | 1 | ||||
-rw-r--r-- | app/services/files/multi_service.rb | 1 |
6 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index d2fcb2efd6a..a94077c2bd4 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -6,12 +6,12 @@ module CreatesCommit source_branch = @ref if @ref && @repository.find_branch(@ref) commit_params = @commit_params.merge( - source_project: @project, + source_project: @tree_edit_project, source_branch: source_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 update_flash_notice(success_notice) diff --git a/app/services/commits/change_service.rb b/app/services/commits/change_service.rb index 99d459908e7..9c630f5bbf1 100644 --- a/app/services/commits/change_service.rb +++ b/app/services/commits/change_service.rb @@ -37,6 +37,7 @@ module Commits @commit, into, tree_id, + source_project: @source_project, source_branch_name: @target_branch) success diff --git a/app/services/files/create_dir_service.rb b/app/services/files/create_dir_service.rb index 4a2b2e8fcaf..ee4e130a38f 100644 --- a/app/services/files/create_dir_service.rb +++ b/app/services/files/create_dir_service.rb @@ -8,6 +8,7 @@ module Files branch_name: @target_branch, author_email: @author_email, author_name: @author_name, + source_project: @source_project, source_branch_name: @source_branch) end diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb index c95cb75f7cb..853c471666d 100644 --- a/app/services/files/create_service.rb +++ b/app/services/files/create_service.rb @@ -10,6 +10,7 @@ module Files update: false, author_email: @author_email, author_name: @author_name, + source_project: @source_project, source_branch_name: @source_branch) end diff --git a/app/services/files/delete_service.rb b/app/services/files/delete_service.rb index 45a9a559469..cfe532d49b3 100644 --- a/app/services/files/delete_service.rb +++ b/app/services/files/delete_service.rb @@ -8,6 +8,7 @@ module Files branch_name: @target_branch, author_email: @author_email, author_name: @author_name, + source_project: @source_project, source_branch_name: @source_branch) end end diff --git a/app/services/files/multi_service.rb b/app/services/files/multi_service.rb index 42ed97ca3c0..f77e5d91103 100644 --- a/app/services/files/multi_service.rb +++ b/app/services/files/multi_service.rb @@ -10,6 +10,7 @@ module Files actions: params[:actions], author_email: @author_email, author_name: @author_name, + source_project: @source_project, source_branch_name: @source_branch ) end |