Skip to content
代码片段 群组 项目
提交 edc46e11 编辑于 作者: Martin Wortschack's avatar Martin Wortschack
浏览文件

Remove bitbucket_server_convert_mentions_to_users

Changelog: removed
上级 8fddaef2
No related branches found
No related tags found
无相关合并请求
......@@ -14,11 +14,7 @@ def import(project)
importer.execute
if Feature.enabled?(:bitbucket_server_convert_mentions_to_users, project.creator)
ImportUsersWorker.perform_async(project.id)
else
ImportPullRequestsWorker.perform_async(project.id)
end
ImportUsersWorker.perform_async(project.id)
end
def importer_class
......
---
name: bitbucket_server_convert_mentions_to_users
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139097
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/434453
milestone: '16.7'
type: development
group: group::import and integrate
default_enabled: false
......@@ -53,11 +53,7 @@ def description
description += author_line
description += object[:description] if object[:description]
if Feature.enabled?(:bitbucket_server_convert_mentions_to_users, project.creator)
description = mentions_converter.convert(description)
end
description
mentions_converter.convert(description)
end
def author_line
......
......@@ -193,11 +193,7 @@ def pull_request_comment_attributes(comment)
note = "*By #{comment.author_username} (#{comment.author_email})*\n\n"
end
comment_note = if Feature.enabled?(:bitbucket_server_convert_mentions_to_users, project.creator)
mentions_converter.convert(comment.note)
else
comment.note
end
comment_note = mentions_converter.convert(comment.note)
note +=
# Provide some context for replying
......
......@@ -37,18 +37,6 @@
)
end
context 'when the `bitbucket_server_convert_mentions_to_users` flag is disabled' do
before do
stub_feature_flags(bitbucket_server_convert_mentions_to_users: false)
end
it 'does not convert mentions' do
expect_next(Gitlab::Import::MentionsConverter, 'bitbucket_server', project.id).not_to receive(:convert)
importer.execute
end
end
context 'when the `bitbucket_server_user_mapping_by_username` flag is disabled' do
before do
stub_feature_flags(bitbucket_server_user_mapping_by_username: false)
......
......@@ -179,18 +179,6 @@ def expect_log(stage:, message:)
end
end
context 'when the `bitbucket_server_convert_mentions_to_users` flag is disabled' do
before do
stub_feature_flags(bitbucket_server_convert_mentions_to_users: false)
end
it 'does not convert mentions' do
expect(mentions_converter).not_to receive(:convert)
subject.execute
end
end
it 'logs its progress' do
expect_log(stage: 'import_standalone_pr_comments', message: 'starting')
expect_log(stage: 'import_standalone_pr_comments', message: 'finished')
......@@ -273,18 +261,6 @@ def expect_log(stage:, message:)
expect(reply_note.position.new_line).to eq(pr_inline_note.new_pos)
end
context 'when the `bitbucket_server_convert_mentions_to_users` flag is disabled' do
before do
stub_feature_flags(bitbucket_server_convert_mentions_to_users: false)
end
it 'does not convert mentions' do
expect(mentions_converter).not_to receive(:convert)
subject.execute
end
end
it 'logs its progress' do
expect_log(stage: 'import_inline_comments', message: 'starting')
expect_log(stage: 'import_inline_comments', message: 'finished')
......
......@@ -24,19 +24,6 @@
worker.perform(project.id)
end
context 'when the bitbucket_server_convert_mentions_to_users flag is disabled' do
before do
stub_feature_flags(bitbucket_server_convert_mentions_to_users: false)
end
it 'skips the user import and schedules the next stage' do
expect(Gitlab::BitbucketServerImport::Stage::ImportPullRequestsWorker).to receive(:perform_async)
.with(project.id)
worker.perform(project.id)
end
end
it 'logs stage start and finish' do
expect(Gitlab::BitbucketServerImport::Logger)
.to receive(:info).with(hash_including(message: 'starting stage', project_id: project.id))
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册