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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
5c72ba0f
Commit
5c72ba0f
authored
Apr 24, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish the import process if some error occurs when fetching the repo
parent
1f498b73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
lib/github/error.rb
lib/github/error.rb
+6
-0
lib/github/import.rb
lib/github/import.rb
+8
-3
No files found.
lib/github/error.rb
0 → 100644
View file @
5c72ba0f
module
Github
class
Error
<
StandardError
end
class
RepositoryFetchError
<
Error
;
end
end
lib/github/import.rb
View file @
5c72ba0f
require_relative
'error'
module
Github
class
Import
include
Gitlab
::
ShellAdapter
...
...
@@ -48,9 +49,12 @@ module Github
fetch_issues
fetch_wiki_repository
expire_repository_cache
track_errors
errors
true
rescue
Github
::
RepositoryFetchError
false
ensure
keep_track_of_errors
end
private
...
...
@@ -63,6 +67,7 @@ module Github
project
.
repository
.
fetch_remote
(
'github'
,
forced:
true
)
rescue
Gitlab
::
Shell
::
Error
=>
e
error
(
:project
,
"https://github.com/
#{
repo
}
.git"
,
e
.
message
)
raise
Github
::
RepositoryFetchError
end
end
...
...
@@ -368,7 +373,7 @@ module Github
repository
.
expire_content_cache
end
def
track
_errors
def
keep_track_of
_errors
return
unless
errors
.
any?
project
.
update_column
(
:import_error
,
{
...
...
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