util github: remove nil as that is already expected behaviour
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
7744f181b9
commit
eca528cccc
@ -480,7 +480,7 @@ module GitHub
|
|||||||
res = GitHub.open_api("#{GitHub::API_URL}/repos/#{user}/#{repo}/license")
|
res = GitHub.open_api("#{GitHub::API_URL}/repos/#{user}/#{repo}/license")
|
||||||
return unless res.key?("license")
|
return unless res.key?("license")
|
||||||
|
|
||||||
res["license"]["spdx_id"] || nil
|
res["license"]["spdx_id"]
|
||||||
rescue GitHub::HTTPNotFoundError
|
rescue GitHub::HTTPNotFoundError
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user