Updated the jsdoc to correctly document the Github.search function.
If a page option is passed into _requestAllPages, it will only fetch that single page, instead of attempting to fetch all of the pages.
Removed the results parameter from _requestAllPages, since that is only meant to be used internally anyway. It's trivial to re-introduce, so let me know if this makes sense to do, since this could break some backwards compatibility if folks are using an unsupported argument.
Added a test for pagination, and a new fixture for that test. Fixed a number of other fixtures that didn't seem to have the correct page number.
Changed the fixtures to use rawHeader instead of header, since the tests were not paginating. This was introduced when the spec for fixture files changed from nock@7 to nock@8.
Let me know if this is the right approach. I've only run tests for the search endpoints (due to lack of access to the testing repo), so I'm not sure if this is going to introduce errors elsewhere.
Closes #406
This could be a potential solution for #460, although introducing a limit could be an alternate solution.
Changes:
Github.search
function.page
option is passed into_requestAllPages
, it will only fetch that single page, instead of attempting to fetch all of the pages.results
parameter from_requestAllPages
, since that is only meant to be used internally anyway. It's trivial to re-introduce, so let me know if this makes sense to do, since this could break some backwards compatibility if folks are using an unsupported argument.rawHeader
instead ofheader
, since the tests were not paginating. This was introduced when the spec for fixture files changed from nock@7 to nock@8.Let me know if this is the right approach. I've only run tests for the search endpoints (due to lack of access to the testing repo), so I'm not sure if this is going to introduce errors elsewhere.
Closes #406 This could be a potential solution for #460, although introducing a
limit
could be an alternate solution.