[GH-ISSUE #106] Incomplete list of repositories for gitea (was #103) #988

Open
opened 2026-04-16 02:23:16 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @hpodhaisky on GitHub (Oct 5, 2020).
Original GitHub issue: https://github.com/pd4d10/git-touch/issues/106

Dear @pd4d10, sorry, I don't know how to re-open issue (#103).

  1. git-touch only fetches the first page (default = 30 repositores) from gitea, see https://try.gitea.io/api/swagger#/user/userCurrentListRepos , how can I access repositories on page 2 etc.?
  2. for gitea, the number of repositories is only marked with ?
    Screenshot_20201005-202740 -- with github, it works fine
Originally created by @hpodhaisky on GitHub (Oct 5, 2020). Original GitHub issue: https://github.com/pd4d10/git-touch/issues/106 Dear @pd4d10, sorry, I don't know how to re-open issue (#103). 1) git-touch only fetches the first page (default = 30 repositores) from gitea, see https://try.gitea.io/api/swagger#/user/userCurrentListRepos , how can I access repositories on page 2 etc.? 2) for gitea, the number of repositories is only marked with ? ![Screenshot_20201005-202740](https://user-images.githubusercontent.com/13908728/95117841-7f9dff00-0749-11eb-9b02-b331fb4faeb4.jpg) -- with github, it works fine
Author
Owner

@pd4d10 commented on GitHub (Oct 6, 2020):

OK. I'll check it.

The '?' is becuase Gitea has no API to get these counts. It is too expensive to traverse all results and only for getting the length.

<!-- gh-comment-id:703981971 --> @pd4d10 commented on GitHub (Oct 6, 2020): OK. I'll check it. The '?' is becuase Gitea has no API to get these counts. It is too expensive to traverse all results and only for getting the length.
Author
Owner

@pd4d10 commented on GitHub (Oct 6, 2020):

Oh, it seems the list API has a x-total-count response header. Probably we could improve it by request only 1 result for getting the length.

<!-- gh-comment-id:703982979 --> @pd4d10 commented on GitHub (Oct 6, 2020): Oh, it seems the list API has a `x-total-count` response header. Probably we could improve it by request only 1 result for getting the length.
Author
Owner

@pd4d10 commented on GitHub (Oct 6, 2020):

git-touch only fetches the first page

After some digging it seems the Gitea API has deprecated x-page and x-hasmore, replaced with x-total-count. But the x-total-count header is still missing in some API, such as https://gitea.com/api/swagger#/user/userListStarred

<!-- gh-comment-id:703993702 --> @pd4d10 commented on GitHub (Oct 6, 2020): > git-touch only fetches the first page After some digging it seems the Gitea API has deprecated `x-page` and `x-hasmore`, replaced with `x-total-count`. But the `x-total-count` header is still missing in some API, such as https://gitea.com/api/swagger#/user/userListStarred
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/git-touch#988