From 4bfd54f3d2e303d751d49834879867f3c62156e9 Mon Sep 17 00:00:00 2001 From: Bart Libert Date: Thu, 5 Apr 2018 13:44:18 +0200 Subject: Import bitbucket issues that are reported by an anonymous user For these kind of issues, the "reporter" field is present but zero. In such a case, "fetch" will not return the default value, but it will return nil. Hence, importing fails, because the "username" field of nil is referenced Fixes issue #44381 --- lib/gitlab/import_formatter.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/gitlab/import_formatter.rb') 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 -- cgit v1.2.3