Commit 9764ba6df2357ee93b9d4163f4011552be32de25

Authored by Dmitriy Zaporozhets
1 parent 42ffbea8

create satellite for imported repo

app/contexts/projects/create_context.rb
... ... @@ -38,6 +38,8 @@ module Projects
38 38 if @project.valid? && @project.import_url.present?
39 39 shell = Gitlab::Shell.new
40 40 if shell.import_repository(@project.path_with_namespace, @project.import_url)
  41 + # We should create satellite for imported repo
  42 + @project.satellite.create unless @project.satellite.exists?
41 43 true
42 44 else
43 45 @project.errors.add(:import_url, 'cannot clone repo')
... ...
app/views/projects/_new_form.html.haml
... ... @@ -28,7 +28,7 @@
28 28 .input
29 29 = f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git'
30 30 .light
31   - URL should be clonable
  31 + URL must be clonable
32 32  
33 33 %p.padded
34 34 New projects are private by default. You choose who can see the project and commit to repository.
... ...