summaryrefslogtreecommitdiff
path: root/lib/github/import.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/github/import.rb')
-rw-r--r--lib/github/import.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/github/import.rb b/lib/github/import.rb
index bf0df041f15..a1854f7f235 100644
--- a/lib/github/import.rb
+++ b/lib/github/import.rb
@@ -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