diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-22 22:04:11 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-11-22 03:47:26 +0300 |
commit | ceac7878e9b5ba56f31f605c40095e8b83d83b6f (patch) | |
tree | 5f03b4cf5b6e9cf3f8aa694d373e22dd705c71e8 /lib/gitlab/bitbucket_import | |
parent | 56cb4762d42f758ad6e4ec1874b7eed8e1c1f687 (diff) |
Clone Bitbucket repositories over HTTPS
Diffstat (limited to 'lib/gitlab/bitbucket_import')
-rw-r--r-- | lib/gitlab/bitbucket_import/project_creator.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/gitlab/bitbucket_import/project_creator.rb b/lib/gitlab/bitbucket_import/project_creator.rb index b90ef0b0fba..9d80c5d4f2b 100644 --- a/lib/gitlab/bitbucket_import/project_creator.rb +++ b/lib/gitlab/bitbucket_import/project_creator.rb @@ -13,15 +13,15 @@ module Gitlab def execute ::Projects::CreateService.new( current_user, - name: repo["name"], - path: repo["slug"], - description: repo["description"], + name: repo.name, + path: repo.slug, + description: repo.description, namespace_id: namespace.id, - visibility_level: repo["is_private"] ? Gitlab::VisibilityLevel::PRIVATE : Gitlab::VisibilityLevel::PUBLIC, - import_type: "bitbucket", - import_source: "#{repo["owner"]}/#{repo["slug"]}", - import_url: "ssh://git@bitbucket.org/#{repo["owner"]}/#{repo["slug"]}.git", - import_data: { credentials: { bb_session: session_data } } + visibility_level: repo.visibility_level, + import_type: 'bitbucket', + import_source: repo.full_name, + import_url: repo.clone_url(@session_data[:token]), + import_data: { credentials: session_data } ).execute end end |