xanzy / go-gitlab

GitLab Go SDK
Apache License 2.0
2.37k stars 940 forks source link

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

Closed 0xDagal closed 2 weeks ago

0xDagal commented 1 month ago

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

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 commented 1 month ago

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 commented 1 month ago

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.