diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-01-06 23:50:08 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-01-07 00:31:11 +0800 |
commit | a6394540327cd3919e5189a35a21b57800a104fc (patch) | |
tree | 84e51a4b956ded88be710d33a63a8cc1276563bf | |
parent | ccc73c455ba0b95b531c69414a6a1f47667f16b5 (diff) | |
download | gitlab-ce-a6394540327cd3919e5189a35a21b57800a104fc.tar.gz |
Fix renaming
-rw-r--r-- | lib/api/commits.rb | 2 | ||||
-rw-r--r-- | lib/api/files.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/files/editing_a_file_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/diff/position_tracer_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/repository_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/files/update_service_spec.rb | 4 |
6 files changed, 9 insertions, 9 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index 2c1da0902c9..031759cdcdf 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -55,7 +55,7 @@ module API authorize! :push_code, user_project attrs = declared_params - attrs[:source_branch] = attrs[:branch_name] + attrs[:start_branch] = attrs[:branch_name] attrs[:target_branch] = attrs[:branch_name] attrs[:actions].map! do |action| action[:action] = action[:action].to_sym diff --git a/lib/api/files.rb b/lib/api/files.rb index 2e79e22e649..c58472de578 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -5,7 +5,7 @@ module API def commit_params(attrs) { file_path: attrs[:file_path], - source_branch: attrs[:branch_name], + start_branch: attrs[:branch_name], target_branch: attrs[:branch_name], commit_message: attrs[:commit_message], file_content: attrs[:content], diff --git a/spec/features/projects/files/editing_a_file_spec.rb b/spec/features/projects/files/editing_a_file_spec.rb index fe047e00409..36a80d7575d 100644 --- a/spec/features/projects/files/editing_a_file_spec.rb +++ b/spec/features/projects/files/editing_a_file_spec.rb @@ -7,7 +7,7 @@ feature 'User wants to edit a file', feature: true do let(:user) { create(:user) } let(:commit_params) do { - source_branch: project.default_branch, + start_branch: project.default_branch, target_branch: project.default_branch, commit_message: "Committing First Update", file_path: ".gitignore", diff --git a/spec/lib/gitlab/diff/position_tracer_spec.rb b/spec/lib/gitlab/diff/position_tracer_spec.rb index c268f84c759..f77ab016e9b 100644 --- a/spec/lib/gitlab/diff/position_tracer_spec.rb +++ b/spec/lib/gitlab/diff/position_tracer_spec.rb @@ -99,7 +99,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do Files::CreateService.new( project, current_user, - source_branch: branch_name, + start_branch: branch_name, target_branch: branch_name, commit_message: "Create file", file_path: file_name, @@ -112,7 +112,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do Files::UpdateService.new( project, current_user, - source_branch: branch_name, + start_branch: branch_name, target_branch: branch_name, commit_message: "Update file", file_path: file_name, @@ -125,7 +125,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do Files::DeleteService.new( project, current_user, - source_branch: branch_name, + start_branch: branch_name, target_branch: branch_name, commit_message: "Delete file", file_path: file_name diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 0f43c5c019a..36564a3f9e0 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -280,7 +280,7 @@ describe Repository, models: true do expect do repository.commit_dir(user, 'newdir', message: 'Create newdir', branch_name: 'patch', - source_branch_name: 'master', source_project: forked_project) + start_branch_name: 'master', start_project: forked_project) end.to change { repository.commits('master').count }.by(0) expect(repository.branch_exists?('patch')).to be_truthy diff --git a/spec/services/files/update_service_spec.rb b/spec/services/files/update_service_spec.rb index 6fadee9304b..35e6e139238 100644 --- a/spec/services/files/update_service_spec.rb +++ b/spec/services/files/update_service_spec.rb @@ -17,8 +17,8 @@ describe Files::UpdateService do file_content: new_contents, file_content_encoding: "text", last_commit_sha: last_commit_sha, - source_project: project, - source_branch: project.default_branch, + start_project: project, + start_branch: project.default_branch, target_branch: target_branch } end |