blob: 72b10f536ec2d4b2dce7d7117f2183772e4876ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
module Gitlab
module GitlabImport
class ProjectCreator
attr_reader :repo, :namespace, :current_user, :session_data
def initialize(namespace_id, current_user, file, project_path)
@namespace_id = namespace_id
@current_user = current_user
@file = file
@project_path = project_path
end
def execute
::Projects::CreateService.new(
current_user,
name: @project_path,
path: @project_path,
namespace_id: namespace_id,
import_type: "gitlab_project",
import_source: @file
).execute
end
end
end
end
|