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
Fix pagination being ignored for Gitea #66
Conversation
|
Sorry for being slightly off-topic here, but my go skills are not good enough to tell it to use your patch when building drone. If you could give me a pointer how to achieve that I'd like to rebuild drone and report back if this actually fixes go-gitea/gitea#11970 |
|
Hi, On your commit, there're mentions to "per_page" parameters but on the Gitea API version 1.12.0, per_page doesn't exists, and may be replaced by "limit". Paul |
|
Ah sorry @paulbsd didn't notice that when copying util file from github implementation |
|
@moepman Before building drone you need to |
|
@bradrydzewski I've went ahead and added support for pagination on every endpoint. I do not guarantee that all of them support pagination right now, but If i am right then it won't matter anyway because Drone will never ask go-scm for next page if |
I still didn't quite figure out how to tell go get use your branch instead of upstream... |
fix: add an API for listing files in a repository
Fixes #64
Gitea implementation was completely ignoring opts from Drone, so after we introduced proper pagination headers in v1.12, Drone would ask go-scm for page 2, and go-scm would request page 1 and return it, causing infinite loop of requests.