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

GitLab.com integration: refactoring

parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment