Commit e0c158d7 authored by Sean McGivern's avatar Sean McGivern

Merge branch '818-rebase-commiter' into 'master'

Rebase - fix commiter email & name

Closes #818

See merge request !1341
parents a6ffdfea 2b5b8c15
......@@ -26,7 +26,8 @@ module MergeRequests
run_git_command(
%W(pull --rebase #{target_project.repository.path_to_repo} #{merge_request.target_branch}),
tree_path,
git_env,
git_env.merge('GIT_COMMITTER_NAME' => current_user.name,
'GIT_COMMITTER_EMAIL' => current_user.email),
'rebase branch'
)
......
---
title: Rebase - fix commiter email & name
merge_request:
author:
......@@ -31,6 +31,15 @@ describe MergeRequests::RebaseService do
head_sha = merge_request.source_project.repository.commit(merge_request.source_branch).sha
expect(merge_request.reload.rebase_commit_sha).to eq(head_sha)
end
it 'logs correct author and commiter' do
head_commit = merge_request.source_project.repository.commit(merge_request.source_branch)
expect(head_commit.author_email).to eq('dmitriy.zaporozhets@gmail.com')
expect(head_commit.author_name).to eq('Dmitriy Zaporozhets')
expect(head_commit.committer_email).to eq(user.email)
expect(head_commit.committer_name).to eq(user.name)
end
end
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