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

Fix renaming

parent ccc73c45
......@@ -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
......
......@@ -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],
......
......@@ -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",
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
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