Method: Gitlab::FogbugzImport::Importer#initialize

Defined in:
lib/gitlab/fogbugz_import/importer.rb

#initialize(project) ⇒ Importer

Returns a new instance of Importer.



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

def initialize(project)
  @project = project

  import_data = project.import_data.try(:data)
  repo_data = import_data['repo'] if import_data
  if repo_data
    @repo = FogbugzImport::Repository.new(repo_data)
    @known_labels = Set.new
  else
    raise Projects::ImportService::Error, "Unable to find project import data credentials for project ID: #{@project.id}"
  end
end