Class: Gitlab::BitbucketImport::Importer
- Inherits:
-
Object
- Object
- Gitlab::BitbucketImport::Importer
- Defined in:
- lib/gitlab/bitbucket_import/importer.rb
Constant Summary collapse
- LABELS =
[{ title: 'bug', color: '#FF0000' }, { title: 'enhancement', color: '#428BCA' }, { title: 'proposal', color: '#69D100' }, { title: 'task', color: '#7F8C8D' }].freeze
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project) ⇒ Importer
constructor
A new instance of Importer.
Constructor Details
#initialize(project) ⇒ Importer
Returns a new instance of Importer.
13 14 15 16 17 18 19 20 |
# File 'lib/gitlab/bitbucket_import/importer.rb', line 13 def initialize(project) @project = project @client = Bitbucket::Client.new(project.import_data.credentials) @formatter = Gitlab::ImportFormatter.new @labels = {} @errors = [] @users = {} end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
11 12 13 |
# File 'lib/gitlab/bitbucket_import/importer.rb', line 11 def client @client end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
11 12 13 |
# File 'lib/gitlab/bitbucket_import/importer.rb', line 11 def errors @errors end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
11 12 13 |
# File 'lib/gitlab/bitbucket_import/importer.rb', line 11 def project @project end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
11 12 13 |
# File 'lib/gitlab/bitbucket_import/importer.rb', line 11 def users @users end |
Instance Method Details
#execute ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/gitlab/bitbucket_import/importer.rb', line 22 def execute import_wiki import_issues import_pull_requests handle_errors metrics.track_finished_import true end |