You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/api/v1
Cirno the Strongest fdc6287973
Rework api/user/repos for pagination (#11827) (#11877)
* Add count to `GetUserRepositories` so that pagination can be supported for `/user/{username}/repos`
* Rework ListMyRepos to use models.SearchRepository

ListMyRepos was an odd one. It first fetched all user repositories and then tried to supplement them with accessible map. The end result was that:

* Limit for pagination did not work because accessible repos would always be appended
* The amount of pages was incorrect if one were to calculate it
* When paginating, all accessible repos would be shown on every page

Hopefully it should now work properly. Fixes #11800 and does not require any change on Drone-side as it can properly interpret and act on Link header which we now set.

Co-authored-by: Lauris BH <lauris@nix.lv>
(cherry picked from commit 0159851cc3)
5 years ago
..
admin Various fixes in login sources (#10428) 5 years ago
misc Allow different HardBreaks settings for documents and comments (#11515) (#11599) 5 years ago
notify [Api] Check Notify (always return json) (#10059) 5 years ago
org Add Organization Wide Labels (#10814) 5 years ago
repo Honor DEFAULT_PAGING_NUM for API (#11805) (#11813) 5 years ago
swagger API: Add pull review endpoints (#11224) 5 years ago
user Rework api/user/repos for pagination (#11827) (#11877) 5 years ago
utils Granular webhook events (#9626) 5 years ago
api.go Correctly set the organization num repos (#11339) 5 years ago