Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github pagination does not operate if the response is not a list, such as in the list-workflow-runs API #76

Open
joshzana opened this issue Mar 24, 2020 · 0 comments

Comments

@joshzana
Copy link

The List workflow runs GitHub API returns an object with a nested list. It also returns the standard GitHub link headers to support pagination.

With the following code, no pagination occurs:

    github_client = GitHub(token=GITHUB_TOKEN, paginate=True)
    status, data = github_client.repos.falkonai.server.actions.workflows[
        "<workflow_name>"
    ].runs.get()

I believe the issue is this check in the Github request method:

if self.paginate and type(data) == list:

Since data is a dict here. I don't know why Github chose to make this API return an object instead of a list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant