Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
7aaa029c408b
Commit
ceac7878
authored
Aug 22, 2016
by
Douglas Barbosa Alexandre
Committed by
Stan Hu
Nov 21, 2016
Browse files
Clone Bitbucket repositories over HTTPS
parent
2cb565234aca
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/gitlab/bitbucket_import/project_creator.rb
View file @
7aaa029c
...
...
@@ -13,15 +13,15 @@ def initialize(repo, namespace, current_user, session_data)
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment