Commit b91b4b35 authored by Marc Shaw's avatar Marc Shaw

Fix bug where the merge description wasn't showing with merge train

Issue: gitlab.com/gitlab-org/gitlab/-/issues/232957
MR: gitlab.com/gitlab-org/gitlab/-/merge_requests/57787

The issue was that the params were strings, { "test" => .. }
when the commit_message was looking for a symbol.
parent 6a96e3a5
---
title: Fix issue where merge description not showing when merged with merge train
merge_request: 57787
author:
type: fixed
...@@ -62,7 +62,7 @@ module MergeTrains ...@@ -62,7 +62,7 @@ module MergeTrains
def merge! def merge!
merge_train.start_merge! merge_train.start_merge!
MergeRequests::MergeService.new(project, merge_user, merge_request.merge_params) MergeRequests::MergeService.new(project, merge_user, merge_request.merge_params.with_indifferent_access)
.execute(merge_request, skip_discussions_check: true) .execute(merge_request, skip_discussions_check: true)
raise ProcessError, "failed to merge. #{merge_request.merge_error}" unless merge_request.merged? raise ProcessError, "failed to merge. #{merge_request.merge_error}" unless merge_request.merged?
......
...@@ -208,7 +208,7 @@ RSpec.describe MergeTrains::RefreshMergeRequestService do ...@@ -208,7 +208,7 @@ RSpec.describe MergeTrains::RefreshMergeRequestService do
expect(merge_request).to receive(:cleanup_refs).with(only: :train) expect(merge_request).to receive(:cleanup_refs).with(only: :train)
expect(merge_request.merge_train).to receive(:start_merge!).and_call_original expect(merge_request.merge_train).to receive(:start_merge!).and_call_original
expect(merge_request.merge_train).to receive(:finish_merge!).and_call_original expect(merge_request.merge_train).to receive(:finish_merge!).and_call_original
expect_next_instance_of(MergeRequests::MergeService, project, maintainer, anything) do |service| expect_next_instance_of(MergeRequests::MergeService, project, maintainer, instance_of(HashWithIndifferentAccess)) do |service|
expect(service).to receive(:execute).with(merge_request, skip_discussions_check: true).and_call_original expect(service).to receive(:execute).with(merge_request, skip_discussions_check: true).and_call_original
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