fix crash when user in NULL

This commit is contained in:
Petr Korolev 2014-12-15 15:54:11 +02:00
parent 9646b49add
commit e29ff3c3a9

View File

@ -10,7 +10,11 @@ module GitHubChangelogGenerator
merge = "#{@options[:merge_prefix]}#{encapsulated_title} [\\##{pull_request[:number]}](#{pull_request.html_url})" merge = "#{@options[:merge_prefix]}#{encapsulated_title} [\\##{pull_request[:number]}](#{pull_request.html_url})"
if @options[:author] if @options[:author]
if !pull_request.user.nil?
merge += " ([#{pull_request.user.login}](#{pull_request.user.html_url}))\n\n" merge += " ([#{pull_request.user.login}](#{pull_request.user.html_url}))\n\n"
else
merge += " ({Null user})\n\n"
end
else else
merge += "\n\n" merge += "\n\n"
end end