pd4d10 / git-touch

An open-source app for GitHub, GitLab, Bitbucket, Gitea, and Gitee(码云), built with Flutter
Apache License 2.0
1.56k stars 134 forks source link

Incomplete list of repositories for gitea (was #103) #106

Open hpodhaisky opened 3 years ago

hpodhaisky commented 3 years ago

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

pd4d10 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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