mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 01:26:08 +10:00
GitLab.com integration: refactoring
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Gitlab
|
||||
module Github
|
||||
module GithubImport
|
||||
class Client
|
||||
attr_reader :client
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Gitlab
|
||||
module Github
|
||||
module GithubImport
|
||||
class Importer
|
||||
attr_reader :project
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Gitlab
|
||||
module Github
|
||||
module GithubImport
|
||||
class ProjectCreator
|
||||
attr_reader :repo, :namespace, :current_user
|
||||
|
||||
Reference in New Issue
Block a user