Skip to content
Snippets Groups Projects
Commit 85aeb884 authored by Saverio Miroddi's avatar Saverio Miroddi
Browse files

Add support for start project to commit cherry-pick description

parent e33608d8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -251,11 +251,11 @@ class Commit
project.repository.next_branch("cherry-pick-#{short_id}", mild: true)
end
 
def cherry_pick_description(start_branch_name)
def cherry_pick_description(start_project, start_branch_name)
message_buffer = "(cherry picked from commit #{sha})"
 
if merge_commit?
compare = CompareService.new(project, sha).execute(project, start_branch_name)
compare = CompareService.new(project, sha).execute(start_project, start_branch_name)
 
# Ignore the merge commit.
commits_in_merge = compare.commits[0..-2]
Loading
Loading
@@ -272,8 +272,8 @@ class Commit
message_buffer
end
 
def cherry_pick_message(start_branch_name)
%Q{#{message}\n\n#{cherry_pick_description(start_branch_name)}}
def cherry_pick_message(start_project, start_branch_name)
%Q{#{message}\n\n#{cherry_pick_description(start_project, start_branch_name)}}
end
 
def revert_description(user)
Loading
Loading
Loading
Loading
@@ -879,7 +879,7 @@ class Repository
 
committer = user_to_committer(user)
 
commit_message = commit.cherry_pick_message(start_branch_name)
commit_message = commit.cherry_pick_message(start_project, start_branch_name)
 
create_commit(message: commit_message,
author: {
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