diff options
author | James Lopez <james@jameslopez.es> | 2016-03-29 17:10:35 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-03-29 17:10:35 +0300 |
commit | c93570d8fb439a8a60a204bcc41e5e8a720730e4 (patch) | |
tree | 9a3e67b2690de209e96889725d1dccc771d81480 /lib/gitlab | |
parent | 28df200c66f88348e0c995fc8023b6dd78b9bf9b (diff) |
fixing a few issues after testing imports
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/bitbucket_import/project_creator.rb | 3 | ||||
-rw-r--r-- | lib/gitlab/fogbugz_import/project_creator.rb | 11 | ||||
-rw-r--r-- | lib/gitlab/google_code_import/project_creator.rb | 9 |
3 files changed, 10 insertions, 13 deletions
diff --git a/lib/gitlab/bitbucket_import/project_creator.rb b/lib/gitlab/bitbucket_import/project_creator.rb index 0e6f66de321..7dc3e01753a 100644 --- a/lib/gitlab/bitbucket_import/project_creator.rb +++ b/lib/gitlab/bitbucket_import/project_creator.rb @@ -22,8 +22,11 @@ module Gitlab import_source: "#{repo["owner"]}/#{repo["slug"]}", import_url: "ssh://git@bitbucket.org/#{repo["owner"]}/#{repo["slug"]}.git", ).execute + import_data = project.import_data import_data.credentials.merge!("bb_session" => session_data) + import_data.save + project end end diff --git a/lib/gitlab/fogbugz_import/project_creator.rb b/lib/gitlab/fogbugz_import/project_creator.rb index 73d6272720a..15914aea3b9 100644 --- a/lib/gitlab/fogbugz_import/project_creator.rb +++ b/lib/gitlab/fogbugz_import/project_creator.rb @@ -24,13 +24,10 @@ module Gitlab import_url: Project::UNKNOWN_IMPORT_URL ).execute - project.create_import_data( - credentials: { - 'repo' => repo.raw_data, - 'user_map' => user_map, - 'fb_session' => fb_session - } - ) + import_data = project.import_data + import_data.credentials.merge!('fb_session' => fb_session) + import_data.data = { 'repo' => repo.raw_data, 'user_map' => user_map } + import_data.save project end diff --git a/lib/gitlab/google_code_import/project_creator.rb b/lib/gitlab/google_code_import/project_creator.rb index 87821c23460..49d6013af28 100644 --- a/lib/gitlab/google_code_import/project_creator.rb +++ b/lib/gitlab/google_code_import/project_creator.rb @@ -24,12 +24,9 @@ module Gitlab import_url: repo.import_url ).execute - project.create_import_data( - data: { - "repo" => repo.raw_data, - "user_map" => user_map - } - ) + import_data = project.import_data + import_data.data = { 'repo' => repo.raw_data, 'user_map' => user_map } + import_data.save project end |