diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-11-15 13:27:37 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-11-15 13:40:35 +0100 |
commit | 8da236611b5182a1105111904027ae3e74ed1682 (patch) | |
tree | 40d3e2de5330495f382bfda4ea07762546cd1630 /lib | |
parent | 148f40792c5a619054f71ec4ece522fb0adfbda8 (diff) | |
download | gitlab-ce-8da236611b5182a1105111904027ae3e74ed1682.tar.gz |
Prefer polymorphism over specific type checks in Import servicedm-import-service-polymorphism
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/github_import/parallel_importer.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/import_export/importer.rb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/parallel_importer.rb b/lib/gitlab/github_import/parallel_importer.rb index 81739834b41..6da11e6ef08 100644 --- a/lib/gitlab/github_import/parallel_importer.rb +++ b/lib/gitlab/github_import/parallel_importer.rb @@ -11,6 +11,10 @@ module Gitlab true end + def self.imports_repository? + true + end + def initialize(project) @project = project end diff --git a/lib/gitlab/import_export/importer.rb b/lib/gitlab/import_export/importer.rb index fbdd74788bc..c14646b0611 100644 --- a/lib/gitlab/import_export/importer.rb +++ b/lib/gitlab/import_export/importer.rb @@ -1,6 +1,10 @@ module Gitlab module ImportExport class Importer + def self.imports_repository? + true + end + def initialize(project) @archive_file = project.import_source @current_user = project.creator |