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

Fix renaming

parent ccc73c45
...@@ -55,7 +55,7 @@ module API ...@@ -55,7 +55,7 @@ module API
authorize! :push_code, user_project authorize! :push_code, user_project
attrs = declared_params attrs = declared_params
attrs[:source_branch] = attrs[:branch_name] attrs[:start_branch] = attrs[:branch_name]
attrs[:target_branch] = attrs[:branch_name] attrs[:target_branch] = attrs[:branch_name]
attrs[:actions].map! do |action| attrs[:actions].map! do |action|
action[:action] = action[:action].to_sym action[:action] = action[:action].to_sym
......
...@@ -5,7 +5,7 @@ module API ...@@ -5,7 +5,7 @@ module API
def commit_params(attrs) def commit_params(attrs)
{ {
file_path: attrs[:file_path], file_path: attrs[:file_path],
source_branch: attrs[:branch_name], start_branch: attrs[:branch_name],
target_branch: attrs[:branch_name], target_branch: attrs[:branch_name],
commit_message: attrs[:commit_message], commit_message: attrs[:commit_message],
file_content: attrs[:content], file_content: attrs[:content],
......
...@@ -7,7 +7,7 @@ feature 'User wants to edit a file', feature: true do ...@@ -7,7 +7,7 @@ feature 'User wants to edit a file', feature: true do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:commit_params) do let(:commit_params) do
{ {
source_branch: project.default_branch, start_branch: project.default_branch,
target_branch: project.default_branch, target_branch: project.default_branch,
commit_message: "Committing First Update", commit_message: "Committing First Update",
file_path: ".gitignore", file_path: ".gitignore",
......
...@@ -99,7 +99,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do ...@@ -99,7 +99,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
Files::CreateService.new( Files::CreateService.new(
project, project,
current_user, current_user,
source_branch: branch_name, start_branch: branch_name,
target_branch: branch_name, target_branch: branch_name,
commit_message: "Create file", commit_message: "Create file",
file_path: file_name, file_path: file_name,
...@@ -112,7 +112,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do ...@@ -112,7 +112,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
Files::UpdateService.new( Files::UpdateService.new(
project, project,
current_user, current_user,
source_branch: branch_name, start_branch: branch_name,
target_branch: branch_name, target_branch: branch_name,
commit_message: "Update file", commit_message: "Update file",
file_path: file_name, file_path: file_name,
...@@ -125,7 +125,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do ...@@ -125,7 +125,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
Files::DeleteService.new( Files::DeleteService.new(
project, project,
current_user, current_user,
source_branch: branch_name, start_branch: branch_name,
target_branch: branch_name, target_branch: branch_name,
commit_message: "Delete file", commit_message: "Delete file",
file_path: file_name file_path: file_name
......
...@@ -280,7 +280,7 @@ describe Repository, models: true do ...@@ -280,7 +280,7 @@ describe Repository, models: true do
expect do expect do
repository.commit_dir(user, 'newdir', repository.commit_dir(user, 'newdir',
message: 'Create newdir', branch_name: 'patch', 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) end.to change { repository.commits('master').count }.by(0)
expect(repository.branch_exists?('patch')).to be_truthy expect(repository.branch_exists?('patch')).to be_truthy
......
...@@ -17,8 +17,8 @@ describe Files::UpdateService do ...@@ -17,8 +17,8 @@ describe Files::UpdateService do
file_content: new_contents, file_content: new_contents,
file_content_encoding: "text", file_content_encoding: "text",
last_commit_sha: last_commit_sha, last_commit_sha: last_commit_sha,
source_project: project, start_project: project,
source_branch: project.default_branch, start_branch: project.default_branch,
target_branch: target_branch target_branch: target_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