forgejo/models
Cirno the Strongest 0159851cc3
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>
2020-06-13 12:35:59 +01:00
..
fixtures
migrations Add migration to set IsArchived false if it is null (#11853) 2020-06-11 16:18:11 -04:00
access.go
access_test.go
action.go Add hide activity option (#11353) 2020-06-05 16:01:53 -04:00
action_list.go
action_test.go
admin.go Refactor Cron and merge dashboard tasks (#10745) 2020-05-16 19:31:38 -04:00
admin_test.go
attachment.go
attachment_test.go
avatar.go
branches.go Refactor Cron and merge dashboard tasks (#10745) 2020-05-16 19:31:38 -04:00
branches_test.go
commit_status.go API add/generalize pagination (#9452) 2020-01-24 14:00:29 -05:00
commit_status_test.go
consistency.go Add migration to set IsArchived false if it is null (#11853) 2020-06-11 16:18:11 -04:00
context.go
convert.go
error.go Add API Endpoint for Branch Creation (#11607) 2020-05-29 19:16:20 +01:00
error_oauth2.go
external_login_user.go
fixture_generation.go
fixture_test.go
gpg_key.go Fix verification of subkeys of default gpg key (#11713) 2020-06-03 11:36:41 -04:00
gpg_key_test.go
helper.go
helper_directory.go
helper_environment.go
issue.go Increase maximum SQLite variables count to 32766 (#11696) 2020-06-05 19:57:25 -04:00
issue_assignees.go
issue_assignees_test.go
issue_comment.go Properly handle and return empty string for dangling commits in GetBranchName (#11587) 2020-05-23 20:49:48 +01:00
issue_comment_list.go
issue_comment_test.go
issue_dependency.go
issue_dependency_test.go
issue_label.go
issue_label_test.go
issue_list.go
issue_list_test.go
issue_lock.go
issue_milestone.go Refactor Milestone related (#11225) 2020-05-12 22:54:35 +01:00
issue_milestone_test.go Refactor Milestone related (#11225) 2020-05-12 22:54:35 +01:00
issue_reaction.go
issue_reaction_test.go
issue_stopwatch.go
issue_stopwatch_test.go
issue_test.go
issue_tracked_time.go Fix tracked time issues (#11349) 2020-05-09 11:18:44 -03:00
issue_tracked_time_test.go
issue_user.go Mail assignee when issue/pull request is assigned (#8546) 2019-10-25 22:46:37 +08:00
issue_user_test.go
issue_watch.go
issue_watch_test.go
issue_xref.go remove unused method and rename createcommentWithNoAction (#9367) 2019-12-16 11:54:24 +08:00
issue_xref_test.go
lfs.go
lfs_lock.go
list_options.go Use DEFAULT_PAGING_NUM instead of MAX_RESPONSE_ITEMS in ListOptions (#11831) 2020-06-10 12:23:22 -04:00
log.go
login_source.go Upgrade xorm to v1.0.0 (#10646) 2020-03-22 11:12:55 -04:00
main_test.go
migrate.go
models.go Doctor check & fix db consistency (#11111) 2020-05-29 14:24:15 +01:00
models_test.go Move database settings from models to setting (#7806) 2019-08-24 11:24:45 +02:00
notification.go Add EventSource support (#11235) 2020-05-07 22:49:00 +01:00
notification_test.go
oauth2.go Changed image of openid-connect logo for better look on arc-green theme (#11312) 2020-05-10 17:55:22 +03:00
oauth2_application.go
oauth2_application_test.go
org.go Prevent multiple listings of organization when creating a repository (#11303) 2020-05-07 14:24:59 +01:00
org_team.go Automatically remove Watches, Assignments, etc if user loses access due to being removed as collaborator or from a team (#10997) 2020-04-07 22:52:01 +01:00
org_team_test.go
org_test.go
pull.go
pull_list.go
pull_sign.go
pull_test.go
release.go
repo.go Rework api/user/repos for pagination (#11827) 2020-06-13 12:35:59 +01:00
repo_activity.go
repo_branch.go
repo_collaboration.go
repo_collaboration_test.go
repo_generate.go
repo_generate_test.go
repo_indexer.go
repo_issue.go
repo_language_stats.go Fix language stat calculation (#11692) 2020-05-31 01:58:55 +03:00
repo_list.go Fix repo-list private and total count bugs (#11500) 2020-05-20 22:15:30 -03:00
repo_list_test.go
repo_mirror.go
repo_permission.go
repo_permission_test.go
repo_redirect.go
repo_redirect_test.go
repo_sign.go
repo_test.go
repo_unit.go
repo_watch.go Code Refactor of IssueWatch related things (#10401) 2020-02-26 03:32:22 -03:00
repo_watch_test.go
review.go
review_test.go
ssh_key.go
ssh_key_test.go
star.go
star_test.go
task.go
test_fixtures.go
token.go
token_test.go
topic.go Update topics repo count when deleting repository (#10051) 2020-01-31 08:57:19 +02:00
topic_test.go
twofactor.go
u2f.go
u2f_test.go
unit.go
unit_tests.go
update.go
upload.go
user.go Rework api/user/repos for pagination (#11827) 2020-06-13 12:35:59 +01:00
user_follow.go
user_follow_test.go
user_heatmap.go Add hide activity option (#11353) 2020-06-05 16:01:53 -04:00
user_heatmap_test.go
user_mail.go
user_mail_test.go
user_openid.go
user_openid_test.go
user_test.go
userlist.go
userlist_test.go
webhook.go
webhook_test.go
wiki.go
wiki_test.go