summaryrefslogtreecommitdiff
path: root/lib/gitlab/legacy_github_import/importer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/legacy_github_import/importer.rb')
-rw-r--r--lib/gitlab/legacy_github_import/importer.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/legacy_github_import/importer.rb b/lib/gitlab/legacy_github_import/importer.rb
index b04d678cf98..c5bde681365 100644
--- a/lib/gitlab/legacy_github_import/importer.rb
+++ b/lib/gitlab/legacy_github_import/importer.rb
@@ -113,6 +113,7 @@ module Gitlab
end
end
+ # rubocop: disable CodeReuse/ActiveRecord
def import_issues
fetch_resources(:issues, repo, state: :all, sort: :created, direction: :asc, per_page: 100) do |issues|
issues.each do |raw|
@@ -133,6 +134,7 @@ module Gitlab
end
end
end
+ # rubocop: enable CodeReuse/ActiveRecord
def import_pull_requests
fetch_resources(:pull_requests, repo, state: :all, sort: :created, direction: :asc, per_page: 100) do |pull_requests|
@@ -193,6 +195,7 @@ module Gitlab
issuable.update_attribute(:label_ids, label_ids)
end
+ # rubocop: disable CodeReuse/ActiveRecord
def import_comments(issuable_type)
resource_type = "#{issuable_type}_comments".to_sym
@@ -213,7 +216,9 @@ module Gitlab
create_comments(comments)
end
end
+ # rubocop: enable CodeReuse/ActiveRecord
+ # rubocop: disable CodeReuse/ActiveRecord
def create_comments(comments)
ActiveRecord::Base.no_touching do
comments.each do |raw|
@@ -238,6 +243,7 @@ module Gitlab
end
end
end
+ # rubocop: enable CodeReuse/ActiveRecord
def discard_inserted_comments(comments, last_note)
last_note_attrs = nil