Skip to content

Manually pagination security advisories#28

Merged
sethmlarson merged 1 commit into
mainfrom
paginate-advisories
Apr 29, 2026
Merged

Manually pagination security advisories#28
sethmlarson merged 1 commit into
mainfrom
paginate-advisories

Conversation

@sethmlarson

@sethmlarson sethmlarson commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

Closes #27 We can't parse out ?after=... and forward it to the same github.rest.security_advisories.list_security_advisories() function because the Link header uses a different API URL (for some reason) and if we do pass after to the other function the call doesn't work at all. GitHub rejects it.

So we've been forced to manually do pagination ourselves, unfortunately. Tested using a GitHub API token.

Comment thread src/psrt_ghsa_bot/app.py
raise


def github_client_request(client: typing.Any, method: str, url: str, params: dict[str, str | int]) -> typing.Any:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is basically copied from githubkit's "Client" class.

@sethmlarson sethmlarson merged commit 61194de into main Apr 29, 2026
2 checks passed
@sethmlarson sethmlarson deleted the paginate-advisories branch April 29, 2026 18:15
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

Successfully merging this pull request may close these issues.

Paginate GHSA advisories

2 participants