PPHub-Feedback icon indicating copy to clipboard operation
PPHub-Feedback copied to clipboard

v2.6.0 - 在网页端看google有2.2k个仓库,...

Open hiifong opened this issue 2 years ago • 5 comments

在网页端看google有2.2k个仓库,但是在pphub上只显示1k,apache的最多也是显示1k,网页显示有2.3k

运行环境: iPhone X - iOS15.2 - v2.6.0(230)

hiifong avatar Jan 12 '22 14:01 hiifong

数据都是 GitHub Api 返回的,可以给贴这个仓库的链接嘛,我检查对比下 @iuvhub

jkpang avatar Feb 11 '22 09:02 jkpang

github/google image QQ20220212-0

hiifong avatar Feb 12 '22 08:02 hiifong

嗯嗯,确实是这样,原因是使用了GitHub V4 GraphQL 查看 组织详情,使用

repositories(ownerAffiliations: [OWNER]) {
        totalCount
}

字段获取仓库数量,若该组织设置 OAuth App访问限制,则接口会报错(很奇怪GitHub官方客户端则没有这个问题,猜测GitHub官方客户端有特殊权限): Although you appear to have the correct authorization credentials, the google organization has enabled OAuth App access restrictions, meaning that data access to third-parties is limited. For more information on these restrictions, including how to enable this app, visit https:\/\/docs.github.com\/articles\/restricting-access-to-your-organization-s-data

所以不得不使用

repositories(ownerAffiliations: [OWNER]) {
        totalCount
}

字段来获取 组织 的仓库数量 ,没想到此字段会有1000的数量限制,我看后续是否会有解决方案 @hiifong

jkpang avatar Feb 14 '22 13:02 jkpang

或许你可以参考一下这个sdkgoogle/go-github @jkpang

hiifong avatar Feb 14 '22 15:02 hiifong

或许你可以参考一下这个sdkgoogle/go-github @jkpang

我也不确定这个sdk会不会有同样的问题

hiifong avatar Feb 14 '22 15:02 hiifong