Merge pull request #16000 from MikeMcQuaid/gitlab_shared_audit_fix
utils/shared_audits: handle 404 metadata errors from GitLab API.
This commit is contained in:
commit
24de357fbf
@ -59,7 +59,9 @@ module SharedAudits
|
||||
@gitlab_repo_data ||= {}
|
||||
@gitlab_repo_data["#{user}/#{repo}"] ||= begin
|
||||
out, _, status = Utils::Curl.curl_output("https://gitlab.com/api/v4/projects/#{user}%2F#{repo}")
|
||||
JSON.parse(out) if status.success?
|
||||
json = JSON.parse(out) if status.success?
|
||||
json = nil if json&.dig("message")&.include?("404 Project Not Found")
|
||||
json
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user