Commit ed188107 authored by Stan Hu's avatar Stan Hu

Merge branch 'kassio/github-importer-avoid-touch-mr-when-importing-merged-by' into 'master'

Github importer - Avoid touching MR when importing pull request `merged by` field

See merge request gitlab-org/gitlab!48729
parents f0e61d9b 73e5db1b
---
title: Github importer - Avoid touching MR when importing pull request `merged by` field
merge_request: 48729
author:
type: fixed
......@@ -26,6 +26,7 @@ module Gitlab
}, unique_by: :merge_request_id)
else
merge_request.notes.create!(
importing: true,
note: "*Merged by: #{pull_request.merged_by.login}*",
author_id: project.creator_id,
project: project,
......
......@@ -28,7 +28,9 @@ RSpec.describe Gitlab::GithubImport::Importer::PullRequestMergedByImporter, :cle
end
it 'adds a note referencing the merger user when the user cannot be mapped' do
expect { subject.execute }.to change(Note, :count).by(1)
expect { subject.execute }
.to change(Note, :count).by(1)
.and not_change(merge_request, :updated_at)
last_note = merge_request.notes.last
......
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