diff options
author | James Lopez <james@jameslopez.es> | 2016-05-10 12:10:51 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-05-10 12:10:51 +0300 |
commit | 1322c981a0aa0752feb16b95e43a1839094a6262 (patch) | |
tree | 036e29148a237f8bd58f8c36f1caab13337f6325 /lib/gitlab/google_code_import | |
parent | 3dc64764ad4c004f1b72aa4e80f0095e7a9a6571 (diff) |
create import data in service
Diffstat (limited to 'lib/gitlab/google_code_import')
-rw-r--r-- | lib/gitlab/google_code_import/project_creator.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/gitlab/google_code_import/project_creator.rb b/lib/gitlab/google_code_import/project_creator.rb index 0abb7a64c17..326cfcaa8af 100644 --- a/lib/gitlab/google_code_import/project_creator.rb +++ b/lib/gitlab/google_code_import/project_creator.rb @@ -11,7 +11,7 @@ module Gitlab end def execute - project = ::Projects::CreateService.new( + ::Projects::CreateService.new( current_user, name: repo.name, path: repo.name, @@ -21,12 +21,9 @@ module Gitlab visibility_level: Gitlab::VisibilityLevel::PUBLIC, import_type: "google_code", import_source: repo.name, - import_url: repo.import_url + import_url: repo.import_url, + import_data: { data: { 'repo' => repo.raw_data, 'user_map' => user_map } } ).execute - - project.create_or_update_import_data(data: { 'repo' => repo.raw_data, 'user_map' => user_map }) - - project end end end |