forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework api/user/repos for pagination (go-gitea#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 go-gitea#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 <[email protected]> (cherry picked from commit 0159851)
- Loading branch information
Showing
3 changed files
with
48 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters