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
Jérome Perrin
gitlab-ce
Commits
60053c12
Commit
60053c12
authored
Sep 21, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fetch 100 results when calling the GitHub API in Github::Import
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
3b2d68d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lib/github/import.rb
lib/github/import.rb
+6
-6
No files found.
lib/github/import.rb
View file @
60053c12
...
@@ -115,7 +115,7 @@ module Github
...
@@ -115,7 +115,7 @@ module Github
url
=
"/repos/
#{
repo
}
/labels"
url
=
"/repos/
#{
repo
}
/labels"
while
url
while
url
response
=
Github
::
Client
.
new
(
options
).
get
(
url
)
response
=
Github
::
Client
.
new
(
options
).
get
(
url
,
per_page:
100
)
response
.
body
.
each
do
|
raw
|
response
.
body
.
each
do
|
raw
|
begin
begin
...
@@ -139,7 +139,7 @@ module Github
...
@@ -139,7 +139,7 @@ module Github
url
=
"/repos/
#{
repo
}
/milestones"
url
=
"/repos/
#{
repo
}
/milestones"
while
url
while
url
response
=
Github
::
Client
.
new
(
options
).
get
(
url
,
state: :all
)
response
=
Github
::
Client
.
new
(
options
).
get
(
url
,
state: :all
,
per_page:
100
)
response
.
body
.
each
do
|
raw
|
response
.
body
.
each
do
|
raw
|
begin
begin
...
@@ -168,7 +168,7 @@ module Github
...
@@ -168,7 +168,7 @@ module Github
url
=
"/repos/
#{
repo
}
/pulls"
url
=
"/repos/
#{
repo
}
/pulls"
while
url
while
url
response
=
Github
::
Client
.
new
(
options
).
get
(
url
,
state: :all
,
sort: :created
,
direction: :asc
)
response
=
Github
::
Client
.
new
(
options
).
get
(
url
,
state: :all
,
sort: :created
,
direction: :asc
,
per_page:
100
)
response
.
body
.
each
do
|
raw
|
response
.
body
.
each
do
|
raw
|
pull_request
=
Github
::
Representation
::
PullRequest
.
new
(
raw
,
options
.
merge
(
project:
project
))
pull_request
=
Github
::
Representation
::
PullRequest
.
new
(
raw
,
options
.
merge
(
project:
project
))
...
@@ -224,7 +224,7 @@ module Github
...
@@ -224,7 +224,7 @@ module Github
url
=
"/repos/
#{
repo
}
/issues"
url
=
"/repos/
#{
repo
}
/issues"
while
url
while
url
response
=
Github
::
Client
.
new
(
options
).
get
(
url
,
state: :all
,
sort: :created
,
direction: :asc
)
response
=
Github
::
Client
.
new
(
options
).
get
(
url
,
state: :all
,
sort: :created
,
direction: :asc
,
per_page:
100
)
response
.
body
.
each
{
|
raw
|
populate_issue
(
raw
)
}
response
.
body
.
each
{
|
raw
|
populate_issue
(
raw
)
}
...
@@ -276,7 +276,7 @@ module Github
...
@@ -276,7 +276,7 @@ module Github
def
fetch_comments
(
noteable
,
type
,
url
,
klass
=
Note
)
def
fetch_comments
(
noteable
,
type
,
url
,
klass
=
Note
)
while
url
while
url
comments
=
Github
::
Client
.
new
(
options
).
get
(
url
)
comments
=
Github
::
Client
.
new
(
options
).
get
(
url
,
per_page:
100
)
ActiveRecord
::
Base
.
no_touching
do
ActiveRecord
::
Base
.
no_touching
do
comments
.
body
.
each
do
|
raw
|
comments
.
body
.
each
do
|
raw
|
...
@@ -308,7 +308,7 @@ module Github
...
@@ -308,7 +308,7 @@ module Github
url
=
"/repos/
#{
repo
}
/releases"
url
=
"/repos/
#{
repo
}
/releases"
while
url
while
url
response
=
Github
::
Client
.
new
(
options
).
get
(
url
)
response
=
Github
::
Client
.
new
(
options
).
get
(
url
,
per_page:
100
)
response
.
body
.
each
do
|
raw
|
response
.
body
.
each
do
|
raw
|
representation
=
Github
::
Representation
::
Release
.
new
(
raw
)
representation
=
Github
::
Representation
::
Release
.
new
(
raw
)
...
...
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