diff options
author | Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> | 2020-06-13 13:35:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-13 12:35:59 +0100 |
commit | 0159851cc3fa80e4df4908a5e760afa20452f712 (patch) | |
tree | 8f920c6cb3744939c5c9b9e633749cc5a54ab0ab /modules/process | |
parent | 2447ffc74a6e3ab57d98a52de0a7398cadb71e08 (diff) | |
download | gitea-0159851cc3fa80e4df4908a5e760afa20452f712.tar.gz gitea-0159851cc3fa80e4df4908a5e760afa20452f712.zip |
Rework api/user/repos for pagination (#11827)
* 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>
Diffstat (limited to 'modules/process')
0 files changed, 0 insertions, 0 deletions