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
Tatuya Kamada
gitlab-ce
Commits
16b7a164
Commit
16b7a164
authored
Oct 06, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into 8-13-stable
parents
8a96910c
0a7678b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
lib/gitlab/github_import/client.rb
lib/gitlab/github_import/client.rb
+12
-2
No files found.
lib/gitlab/github_import/client.rb
View file @
16b7a164
...
@@ -102,9 +102,19 @@ module Gitlab
...
@@ -102,9 +102,19 @@ module Gitlab
def
request
(
method
,
*
args
,
&
block
)
def
request
(
method
,
*
args
,
&
block
)
sleep
rate_limit_sleep_time
if
rate_limit_exceed?
sleep
rate_limit_sleep_time
if
rate_limit_exceed?
data
=
api
.
send
(
method
,
*
args
,
&
block
)
data
=
api
.
send
(
method
,
*
args
)
return
data
unless
data
.
is_a?
(
Array
)
if
block_given?
yield
data
yield
data
each_response_page
(
&
block
)
else
each_response_page
{
|
page
|
data
.
concat
(
page
)
}
data
end
end
def
each_response_page
last_response
=
api
.
last_response
last_response
=
api
.
last_response
while
last_response
.
rels
[
:next
]
while
last_response
.
rels
[
:next
]
...
...
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