git-touch icon indicating copy to clipboard operation
git-touch copied to clipboard

Incomplete list of repositories for gitea (was #103)

Open hpodhaisky opened this issue 5 years ago • 3 comments

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

hpodhaisky avatar Oct 05 '20 18:10 hpodhaisky

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.

pd4d10 avatar Oct 06 '20 01:10 pd4d10

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.

pd4d10 avatar Oct 06 '20 01:10 pd4d10

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

pd4d10 avatar Oct 06 '20 02:10 pd4d10