Commit ceac7878 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre Committed by Stan Hu

Clone Bitbucket repositories over HTTPS

parent 56cb4762
...@@ -13,15 +13,15 @@ module Gitlab ...@@ -13,15 +13,15 @@ module Gitlab
def execute def execute
::Projects::CreateService.new( ::Projects::CreateService.new(
current_user, current_user,
name: repo["name"], name: repo.name,
path: repo["slug"], path: repo.slug,
description: repo["description"], description: repo.description,
namespace_id: namespace.id, namespace_id: namespace.id,
visibility_level: repo["is_private"] ? Gitlab::VisibilityLevel::PRIVATE : Gitlab::VisibilityLevel::PUBLIC, visibility_level: repo.visibility_level,
import_type: "bitbucket", import_type: 'bitbucket',
import_source: "#{repo["owner"]}/#{repo["slug"]}", import_source: repo.full_name,
import_url: "ssh://git@bitbucket.org/#{repo["owner"]}/#{repo["slug"]}.git", import_url: repo.clone_url(@session_data[:token]),
import_data: { credentials: { bb_session: session_data } } import_data: { credentials: session_data }
).execute ).execute
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment