Class: Gitlab::GithubImport::Importer

Inherits:
Object
  • Object
show all
Includes:
ShellAdapter
Defined in:
lib/gitlab/github_import/importer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ShellAdapter

#gitlab_shell

Constructor Details

#initialize(project) ⇒ Importer


8
9
10
11
12
13
14
15
16
# File 'lib/gitlab/github_import/importer.rb', line 8

def initialize(project)
  @project = project
  if import_data_credentials
    @client = Client.new(import_data_credentials[:user])
    @formatter = Gitlab::ImportFormatter.new
  else
    raise Projects::ImportService::Error, "Unable to find project import data credentials for project ID: #{@project.id}"
  end
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client


6
7
8
# File 'lib/gitlab/github_import/importer.rb', line 6

def client
  @client
end

#projectObject (readonly)

Returns the value of attribute project


6
7
8
# File 'lib/gitlab/github_import/importer.rb', line 6

def project
  @project
end

Instance Method Details

#executeObject


18
19
20
21
# File 'lib/gitlab/github_import/importer.rb', line 18

def execute
  import_labels && import_milestones && import_issues &&
    import_pull_requests && import_wiki
end