Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Feature request: Permit to go through all files with calls to ListTree #1974

Closed
0xDagal opened this issue Jul 19, 2024 · 2 comments · Fixed by #1994
Closed

Feature request: Permit to go through all files with calls to ListTree #1974

0xDagal opened this issue Jul 19, 2024 · 2 comments · Fixed by #1994

Comments

@0xDagal
Copy link
Contributor

0xDagal commented Jul 19, 2024

Context

For a project, I'm trying to go through all files of some projects to find some specific files. And I know about the search blob API, but I do not have the right tier.

What is in the API

To do so, in with the API, I can either

  • use an offset based pagination, retrieve the last page from the response link header and do until I receive an empty table
  • use a keyset based pagination, ordered by ID, get the next ID with the response link header, use the page_token to tell which ID to begin with and, as well, do until I receive an empty table
  • use a keyset based pagination, ordered by ID, get the last ID from my table, use the page_token to tell which ID to begin with and, as well, do until I receive an empty table

With the SDK

With RepositoriesService.ListTree I do not have the last page in my response, neither I have the page_token in the options.

What is needed

To add either the page in the RepositoriesService.ListTree or add the page_token in the ListTreeOptions struct, or both.

I could help in the process by making a PR if needed and also maybe other APIs are affected as the pagination system is everywhere, so I may wait for an answer here.

@svanharmelen
Copy link
Member

svanharmelen commented Aug 8, 2024

I guess we should add it to the ListOptions struct as that one is embedded in all appropriate List...Options structs. Feel free to take a stab at it if you want, but please follow the guidelines 👍🏻

@0xDagal
Copy link
Contributor Author

0xDagal commented Aug 9, 2024

Thanks, I'm in vacation right now and do not have access to my computer, but if no one does it, I'll do it when I'll be back.

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

Successfully merging a pull request may close this issue.

2 participants