diff options
-rw-r--r-- | app/models/commit.rb | 2 | ||||
-rw-r--r-- | spec/models/commit_spec.rb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 5f59d088cd2..78e67c09d93 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -260,7 +260,7 @@ class Commit if commits_in_merge_request.present? message_buffer << "\n" - commits_in_merge_request.each do |commit_in_merge| + commits_in_merge_request.reverse.each do |commit_in_merge| message_buffer << "\n#{commit_in_merge.short_id} #{commit_in_merge.title}" end end diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index 8fc2a30e3ad..25de444da11 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -214,7 +214,7 @@ eos let(:merge_commit) do merge_request = create(:merge_request, - source_branch: 'feature', + source_branch: 'video', target_branch: 'master', source_project: project, author: user) @@ -238,7 +238,8 @@ eos (cherry picked from commit #{merge_commit.sha}) - 0b4bc9a4 Feature added + 467dc98f Add new 'videos' directory + 88790590 Upload new video file STR expect(merge_commit.cherry_pick_message(user)).to include(expected_appended_text) |