summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-20 12:23:14 +0000
committerRémy Coutable <remy@rymai.me>2016-09-20 12:23:14 +0000
commitfb4d2f9e5a5828a05b4c68702c927439e4be648e (patch)
tree151d6788f51f7d57fdbe8a9ce5ee8f77fcc00ddd /lib
parent4276172b6977bb83de2dc86ecccd48984e09955c (diff)
parentc00e79d4e3f83eac13146837244bbbcfa420bfd7 (diff)
downloadgitlab-ce-fb4d2f9e5a5828a05b4c68702c927439e4be648e.tar.gz
Merge branch 'feature/github-edit-path' into 'master'
Lets the user choose a namespace and name on Github imports Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/14971 See merge request !5728
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/github_import/project_creator.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/github_import/project_creator.rb b/lib/gitlab/github_import/project_creator.rb
index e9725880c5e..605abfabdab 100644
--- a/lib/gitlab/github_import/project_creator.rb
+++ b/lib/gitlab/github_import/project_creator.rb
@@ -3,8 +3,9 @@ module Gitlab
class ProjectCreator
attr_reader :repo, :namespace, :current_user, :session_data
- def initialize(repo, namespace, current_user, session_data)
+ def initialize(repo, name, namespace, current_user, session_data)
@repo = repo
+ @name = name
@namespace = namespace
@current_user = current_user
@session_data = session_data
@@ -13,8 +14,8 @@ module Gitlab
def execute
project = ::Projects::CreateService.new(
current_user,
- name: repo.name,
- path: repo.name,
+ name: @name,
+ path: @name,
description: repo.description,
namespace_id: namespace.id,
visibility_level: repo.private ? Gitlab::VisibilityLevel::PRIVATE : ApplicationSetting.current.default_project_visibility,