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

Add support for keyset pagination in RepositoryClient #493

Open
msrouchou opened this issue Jul 25, 2023 · 4 comments
Open

Add support for keyset pagination in RepositoryClient #493

msrouchou opened this issue Jul 25, 2023 · 4 comments

Comments

@msrouchou
Copy link
Contributor

msrouchou commented Jul 25, 2023

@jairbubbles
Copy link
Collaborator

Thinking of pagination, it's a mess right now, it is not supported on all APIs. Maybe we could at the same time rethink how it's done?

@meziantou
Copy link
Collaborator

On other endpoints, NGitLab enables keyset pagination transparently if the parameters are ok. For instance,

url = Utils.AddOrderBy(url, query.OrderBy, supportKeysetPagination: SupportKeysetPagination(query));
. I think we can do the same for this endpoint.

@jairbubbles
Copy link
Collaborator

My problem was on the project commits API, there were no way to specify it. Hopefully it was already set to max page size.

@msrouchou
Copy link
Contributor Author

Just an FYI, when I created this issue, it was because I needed to get specific files knowing their extensions in GitLab.
I discovered that you can use the search endpoint instead, which has a less known syntax.

Example, I could just search for the file extensions I needed by calling

/api/v4/projects/{id}/search?scope=blobs&search=extension:csproj

you can also search by filename, path, etc https://docs.gitlab.com/ee/user/search/advanced_search.html#code-search

I still cannot get over it, it made my life easier on so many levels 😆

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

3 participants