diff options
Diffstat (limited to 'lib/gitlab/gitorious_import/project_creator.rb')
-rw-r--r-- | lib/gitlab/gitorious_import/project_creator.rb | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/gitlab/gitorious_import/project_creator.rb b/lib/gitlab/gitorious_import/project_creator.rb index 3cbebe53997..cc9a91c91f4 100644 --- a/lib/gitlab/gitorious_import/project_creator.rb +++ b/lib/gitlab/gitorious_import/project_creator.rb @@ -10,29 +10,16 @@ module Gitlab end def execute - @project = Project.new( + ::Projects::CreateService.new(current_user, name: repo.name, path: repo.path, description: repo.description, - namespace: namespace, - creator: current_user, + namespace_id: namespace.id, visibility_level: Gitlab::VisibilityLevel::PUBLIC, import_type: "gitorious", import_source: repo.full_name, import_url: repo.import_url - ) - - if @project.save! - @project.reload - - if @project.import_failed? - @project.import_retry - else - @project.import_start - end - end - - @project + ).execute end end end |