Class: Gitlab::GoogleCodeImport::Importer

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/google_code_import/importer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Importer


6
7
8
9
10
11
12
13
14
15
# File 'lib/gitlab/google_code_import/importer.rb', line 6

def initialize(project)
  @project = project

  import_data = project.import_data.try(:data)
  repo_data = import_data["repo"] if import_data
  @repo = GoogleCodeImport::Repository.new(repo_data)

  @closed_statuses = []
  @known_labels = Set.new
end

Instance Attribute Details

#projectObject (readonly)

Returns the value of attribute project


4
5
6
# File 'lib/gitlab/google_code_import/importer.rb', line 4

def project
  @project
end

#repoObject (readonly)

Returns the value of attribute repo


4
5
6
# File 'lib/gitlab/google_code_import/importer.rb', line 4

def repo
  @repo
end

Instance Method Details

#executeObject


17
18
19
20
21
22
23
24
25
26
27
# File 'lib/gitlab/google_code_import/importer.rb', line 17

def execute
  return true unless repo.valid?

  import_status_labels

  import_labels

  import_issues

  true
end