Open KazzmanK opened 8 months ago
The config option is REPO_PAGING_NUM
I have REPO_PAGING_NUM also set to 100
Updated first comment
Gitea now is 1.21.4
I have modified config to make more unique results
[api]
DEFAULT_PAGING_NUM = 100
[ui]
FEED_PAGING_NUM = 101
EXPLORE_PAGING_NUM = 102
ISSUE_PAGING_NUM = 103
[ui.user]
REPO_PAGING_NUM = 104
So UI asks for data with this query /repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=1&limit=104&mode=&archived=false
but reply still has exactly 50 items
I hope this helps. 50 is the value that's being hardcoded for that variable REPO_PAGING_NUM
And then we are not reading the limit search param from the URL, and just using the config value
I am not a Go dev, but it would be nice to get limit
or pageSize
from the URL and just use it in that function. That should do it right?
I override both REPO_PAGING_NUM in ui.user and ui.admin but it does not help. These default hardcoded values are about to be overrided with app.ini values.
Set MAX_RESPONSE_ITEMS
in api
https://docs.gitea.com/administration/config-cheat-sheet#api-api
It worked, and now it is a clear discrepancy between list of repos and pagination control attached to this list. Also, it is not clear that one setting may be capped by other setting. Or pagination control should be capped by the same MAX_RESPONSE_ITEMS setting as list.
I found that ISSUE_PAGING_NUM
also limits the response of an API call, though it should probably only affect the UI itself. When calling against /repos/issues/search
, the API is limited by a setting configured under the [ui]
section of app.ini
.
Description
Under root of Gitea UI there is a repository counter :
And a list of items under it takes a REST as data source, so it is the easiest way to get a json with all repositories.
I personally hate pagination, so , as Gitea is superfast, I configured items per page to higher numbers
So, by now all repositories must fit in this request
/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=1&limit=100&mode=&archived=false
but they are not, this request returns only 50 repositories, but UI thinks that it is OK, and pagination control at the bottom is grayed. UI works as expected, but service is not. To get all 65 repositories I must make two calls
/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=1&limit=50&mode=&archived=false
/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=2&limit=50&mode=&archived=false
Somewhere inside there is no respect to limit counter (=100 in my case)
Screenshots
--
Gitea Version
1.21.3
Can you reproduce the bug on the Gitea demo site?
No
Operating System
win
Browser Version
120