Skip to content
Snippets Groups Projects
Commit a6394540 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Fix renaming

parent ccc73c45
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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],
Loading
Loading
Loading
Loading
@@ -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",
Loading
Loading
Loading
Loading
@@ -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,
Loading
Loading
@@ -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,
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment