提交 18231b0b 编写于 作者: V Valery Sizov

GitLab.com integration: refactoring

上级 7ddba92a
......@@ -47,13 +47,13 @@ class Importers::GithubsController < ApplicationController
namespace.add_owner(current_user)
end
@project = Gitlab::Github::ProjectCreator.new(repo, namespace, current_user).execute
@project = Gitlab::GithubImport::ProjectCreator.new(repo, namespace, current_user).execute
end
private
def client
@client ||= Gitlab::Github::Client.new.client
@client ||= Gitlab::GithubImport::Client.new.client
end
def octo_client
......
......@@ -11,7 +11,7 @@ class RepositoryImportWorker
project.import_url)
if project.import_type == 'github'
result_of_data_import = Gitlab::Github::Importer.new(project).execute
result_of_data_import = Gitlab::GithubImport::Importer.new(project).execute
elsif project.import_type == 'gitlab'
result_of_data_import = Gitlab::GitlabImport::Importer.new(project).execute
else
......
module Gitlab
module Github
module GithubImport
class Client
attr_reader :client
......
module Gitlab
module Github
module GithubImport
class Importer
attr_reader :project
......
module Gitlab
module Github
module GithubImport
class ProjectCreator
attr_reader :repo, :namespace, :current_user
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册