Commit 18231b0b authored by Valery Sizov's avatar Valery Sizov

GitLab.com integration: refactoring

parent 7ddba92a
...@@ -47,13 +47,13 @@ class Importers::GithubsController < ApplicationController ...@@ -47,13 +47,13 @@ class Importers::GithubsController < ApplicationController
namespace.add_owner(current_user) namespace.add_owner(current_user)
end end
@project = Gitlab::Github::ProjectCreator.new(repo, namespace, current_user).execute @project = Gitlab::GithubImport::ProjectCreator.new(repo, namespace, current_user).execute
end end
private private
def client def client
@client ||= Gitlab::Github::Client.new.client @client ||= Gitlab::GithubImport::Client.new.client
end end
def octo_client def octo_client
......
...@@ -11,7 +11,7 @@ class RepositoryImportWorker ...@@ -11,7 +11,7 @@ class RepositoryImportWorker
project.import_url) project.import_url)
if project.import_type == 'github' 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' elsif project.import_type == 'gitlab'
result_of_data_import = Gitlab::GitlabImport::Importer.new(project).execute result_of_data_import = Gitlab::GitlabImport::Importer.new(project).execute
else else
......
module Gitlab module Gitlab
module Github module GithubImport
class Client class Client
attr_reader :client attr_reader :client
......
module Gitlab module Gitlab
module Github module GithubImport
class Importer class Importer
attr_reader :project attr_reader :project
......
module Gitlab module Gitlab
module Github module GithubImport
class ProjectCreator class ProjectCreator
attr_reader :repo, :namespace, :current_user attr_reader :repo, :namespace, :current_user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment