KnpLabs / KnpLabs/php-github-api

Pagination for preview endpoints

Open
#716 12 comments 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
2.2k
Forks
587
PR merge metrics
No merged PRs in 30d

Description

I have some code like below but it appears to be dropping the `Accept` header for the preview of projects endpoint when trying to paginate. Is there some other way that I should be running configure to make that work?

```
$cardsApi = $githubClient->api('repo')->projects()->columns()->cards()->configure();
$paginator = new Github\ResultPager($githubClient);
$parameters = [$columnId];
$cards = $paginator->fetchAll($cardsApi, 'all', $parameters);

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the repo/projects/columns/cards configure chain and Github\ResultPager::fetchAll used in the example, focusing on how preview headers are carried into paginated requests. Reproduce the pagination call and verify that the projects preview Accept header is preserved for every request.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, php
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.