diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-05-30 09:52:58 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-30 09:52:58 +0000 |
commit | 62d96d8854d35121dc5d3b6ff4fe0949be5795d1 (patch) | |
tree | b75b33a083a06c80361f535067a2af190da9bb30 /lib | |
parent | 5a81bca825f84ac26e4161bbba30156defee9c65 (diff) | |
parent | 4bfd54f3d2e303d751d49834879867f3c62156e9 (diff) | |
download | gitlab-ce-62d96d8854d35121dc5d3b6ff4fe0949be5795d1.tar.gz |
Merge branch 'fix/bitbucket_import_anonymous' into 'master'
Import bitbucket issues that are reported by an anonymous user
Closes #44381
See merge request gitlab-org/gitlab-ce!18199
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bitbucket/representation/issue.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/import_formatter.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/bitbucket/representation/issue.rb b/lib/bitbucket/representation/issue.rb index 054064395c3..44bcbc250b3 100644 --- a/lib/bitbucket/representation/issue.rb +++ b/lib/bitbucket/representation/issue.rb @@ -12,7 +12,7 @@ module Bitbucket end def author - raw.fetch('reporter', {}).fetch('username', nil) + raw.dig('reporter', 'username') end def description diff --git a/lib/gitlab/import_formatter.rb b/lib/gitlab/import_formatter.rb index 3e54456e936..4e611e7f16c 100644 --- a/lib/gitlab/import_formatter.rb +++ b/lib/gitlab/import_formatter.rb @@ -9,6 +9,7 @@ module Gitlab end def author_line(author) + author ||= "Anonymous" "*Created by: #{author}*\n\n" end end |