Commit 9764ba6df2357ee93b9d4163f4011552be32de25
1 parent
42ffbea8
Exists in
master
and in
4 other branches
create satellite for imported repo
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
app/contexts/projects/create_context.rb
@@ -38,6 +38,8 @@ module Projects | @@ -38,6 +38,8 @@ module Projects | ||
38 | if @project.valid? && @project.import_url.present? | 38 | if @project.valid? && @project.import_url.present? |
39 | shell = Gitlab::Shell.new | 39 | shell = Gitlab::Shell.new |
40 | if shell.import_repository(@project.path_with_namespace, @project.import_url) | 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 | true | 43 | true |
42 | else | 44 | else |
43 | @project.errors.add(:import_url, 'cannot clone repo') | 45 | @project.errors.add(:import_url, 'cannot clone repo') |
app/views/projects/_new_form.html.haml
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | .input | 28 | .input |
29 | = f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git' | 29 | = f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git' |
30 | .light | 30 | .light |
31 | - URL should be clonable | 31 | + URL must be clonable |
32 | 32 | ||
33 | %p.padded | 33 | %p.padded |
34 | New projects are private by default. You choose who can see the project and commit to repository. | 34 | New projects are private by default. You choose who can see the project and commit to repository. |