Visitar URL original
feat: use the page option to fetch a single page by jeanettehead · Pull Request #409 · github-tools/github · GitHub
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: use the page option to fetch a single page
Signed-off-by: Byron Anderson <banderson@pivotal.io>
  • Loading branch information
Jeanette Head
Jeanette Head committed Dec 20, 2016
commit 21fe6b6e3ee5fe8a1a133d7dadfd88adcac0bf39
2 changes: 1 addition & 1 deletion lib/Requestable.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class Requestable {
results.push(...thisGroup);

const nextUrl = getNextPage(response.headers.link);
if (nextUrl) {
if (nextUrl && typeof options.page !== 'number') {
log(`getting next page: ${nextUrl}`);
return this._requestAllPages(nextUrl, options, cb, results);
}
Expand Down