diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-08-27 17:31:01 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-09-11 17:32:00 +0200 |
commit | 2039c8280db1646845c33d6c5a74e5f23ca6f4de (patch) | |
tree | e2b3cd3012d9711cda7c6afb962ae4228d59521a /app/services/issues/move_service.rb | |
parent | 91c40973dc620430b173ea2df968587d2a708dff (diff) | |
download | gitlab-ce-2039c8280db1646845c33d6c5a74e5f23ca6f4de.tar.gz |
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
Diffstat (limited to 'app/services/issues/move_service.rb')
-rw-r--r-- | app/services/issues/move_service.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/issues/move_service.rb b/app/services/issues/move_service.rb index ec9d8944e4e..d2bdba1e627 100644 --- a/app/services/issues/move_service.rb +++ b/app/services/issues/move_service.rb @@ -58,6 +58,7 @@ module Issues CreateService.new(@new_project, @current_user, new_params).execute end + # rubocop: disable CodeReuse/ActiveRecord def cloneable_label_ids params = { project_id: @new_project.id, @@ -67,6 +68,7 @@ module Issues LabelsFinder.new(current_user, params).execute.pluck(:id) end + # rubocop: enable CodeReuse/ActiveRecord def cloneable_milestone_id title = @old_issue.milestone&.title @@ -97,6 +99,7 @@ module Issues end end + # rubocop: disable CodeReuse/ActiveRecord def copy_resource_label_events @old_issue.resource_label_events.find_in_batches do |batch| events = batch.map do |event| @@ -108,6 +111,7 @@ module Issues Gitlab::Database.bulk_insert(ResourceLabelEvent.table_name, events) end end + # rubocop: enable CodeReuse/ActiveRecord def rewrite_issue_award_emoji rewrite_award_emoji(@old_issue, @new_issue) |