Keep track of import errors
This commit is contained in:
parent
bd9e5c5ddf
commit
09a6d32817
|
@ -50,6 +50,7 @@ module Github
|
|||
fetch_issues
|
||||
fetch_wiki_repository
|
||||
expire_repository_cache
|
||||
track_errors
|
||||
|
||||
errors
|
||||
end
|
||||
|
@ -369,6 +370,15 @@ module Github
|
|||
repository.expire_content_cache
|
||||
end
|
||||
|
||||
def track_errors
|
||||
return unless errors.any?
|
||||
|
||||
project.update_column(:import_error, {
|
||||
message: 'The remote data could not be fully imported.',
|
||||
errors: errors
|
||||
}.to_json)
|
||||
end
|
||||
|
||||
def error(type, url, message)
|
||||
errors << { type: type, url: Gitlab::UrlSanitizer.sanitize(url), error: message }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue