summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-13 10:35:16 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-13 10:35:16 -0800
commitbb1f8b1d8be3d2cfd4467ff78bff875498e1b0e2 (patch)
tree53a133b27d59dd6ec4f7e52a347c68ddf914ea21 /app/workers
parent9ce7492e58d3a90cfd9a07be6ba5b0f4fafe7bc8 (diff)
parentef933a4a962e4ab12c448241ad500e229a569f21 (diff)
downloadgitlab-ce-bb1f8b1d8be3d2cfd4467ff78bff875498e1b0e2.tar.gz
Merge branch 'github_importer'
Conflicts: app/helpers/projects_helper.rb
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/repository_import_worker.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/workers/repository_import_worker.rb b/app/workers/repository_import_worker.rb
index 01586150cd2..0bcc42bc62c 100644
--- a/app/workers/repository_import_worker.rb
+++ b/app/workers/repository_import_worker.rb
@@ -10,7 +10,13 @@ class RepositoryImportWorker
project.path_with_namespace,
project.import_url)
- if result
+ if project.import_type == 'github'
+ result_of_data_import = Gitlab::Github::Importer.new(project).execute
+ else
+ result_of_data_import = true
+ end
+
+ if result && result_of_data_import
project.import_finish
project.save
project.satellite.create unless project.satellite.exists?