Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
09a6d328
Commit
09a6d328
authored
Apr 19, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep track of import errors
parent
bd9e5c5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
lib/github/import.rb
lib/github/import.rb
+10
-0
No files found.
lib/github/import.rb
View file @
09a6d328
...
@@ -50,6 +50,7 @@ module Github
...
@@ -50,6 +50,7 @@ module Github
fetch_issues
fetch_issues
fetch_wiki_repository
fetch_wiki_repository
expire_repository_cache
expire_repository_cache
track_errors
errors
errors
end
end
...
@@ -369,6 +370,15 @@ module Github
...
@@ -369,6 +370,15 @@ module Github
repository
.
expire_content_cache
repository
.
expire_content_cache
end
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
)
def
error
(
type
,
url
,
message
)
errors
<<
{
type:
type
,
url:
Gitlab
::
UrlSanitizer
.
sanitize
(
url
),
error:
message
}
errors
<<
{
type:
type
,
url:
Gitlab
::
UrlSanitizer
.
sanitize
(
url
),
error:
message
}
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment