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
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
......
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