Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2016-12-07 15:00:06 +0300
committerValery Sizov <valery@gitlab.com>2016-12-07 15:00:06 +0300
commitb12d6541835024eb74384551b84bf0e74747d0c3 (patch)
treecde3a9635d616f20bf8c747221d475e0c852b86b /lib/gitlab/bitbucket_import
parent67b7637e5d7d3cf3e3f5cde6e7f984ece368c48c (diff)
BitBuckpet importer. Refactoring. Iteration 2
Diffstat (limited to 'lib/gitlab/bitbucket_import')
-rw-r--r--lib/gitlab/bitbucket_import/importer.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/bitbucket_import/importer.rb b/lib/gitlab/bitbucket_import/importer.rb
index 0f583b07e93..825d43e6589 100644
--- a/lib/gitlab/bitbucket_import/importer.rb
+++ b/lib/gitlab/bitbucket_import/importer.rb
@@ -50,6 +50,13 @@ module Gitlab
if issue.persisted?
client.issue_comments(repo, issue.iid).each do |comment|
+ # The note can be blank for issue service messages like "Chenged title: ..."
+ # We would like to import those comments as well but there is no any
+ # specific parameter that would allow to process them, it's just an empty comment.
+ # To prevent our importer from just crashing or from creating useless empty comments
+ # we do this check.
+ next unless comment.note.present?
+
note = @formatter.author_line(comment.author)
note += comment.note