diff options
author | Valery Sizov <valery@gitlab.com> | 2016-12-07 14:00:06 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-12-07 14:00:06 +0200 |
commit | b12d6541835024eb74384551b84bf0e74747d0c3 (patch) | |
tree | cde3a9635d616f20bf8c747221d475e0c852b86b /lib/gitlab/bitbucket_import | |
parent | 67b7637e5d7d3cf3e3f5cde6e7f984ece368c48c (diff) | |
download | gitlab-ce-b12d6541835024eb74384551b84bf0e74747d0c3.tar.gz |
BitBuckpet importer. Refactoring. Iteration 2
Diffstat (limited to 'lib/gitlab/bitbucket_import')
-rw-r--r-- | lib/gitlab/bitbucket_import/importer.rb | 7 |
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 |