Commit 9764ba6d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

create satellite for imported repo

parent 42ffbea8
...@@ -38,6 +38,8 @@ module Projects ...@@ -38,6 +38,8 @@ module Projects
if @project.valid? && @project.import_url.present? if @project.valid? && @project.import_url.present?
shell = Gitlab::Shell.new shell = Gitlab::Shell.new
if shell.import_repository(@project.path_with_namespace, @project.import_url) if shell.import_repository(@project.path_with_namespace, @project.import_url)
# We should create satellite for imported repo
@project.satellite.create unless @project.satellite.exists?
true true
else else
@project.errors.add(:import_url, 'cannot clone repo') @project.errors.add(:import_url, 'cannot clone repo')
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
.input .input
= f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git' = f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git'
.light .light
URL should be clonable URL must be clonable
%p.padded %p.padded
New projects are private by default. You choose who can see the project and commit to repository. New projects are private by default. You choose who can see the project and commit to repository.
......
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