修复因github API修改导致仓库同步错误的问题

Signed-off-by: gfdgd_xi <3025613752@qq.com>
This commit is contained in:
2026-02-10 20:59:08 +08:00
parent 99c5321d8b
commit 3bb1ee694b
+3 -8
View File
@@ -50,16 +50,11 @@ def sync(i):
os.system(f"rm -rf '{programPath}/git-clone/{i}.git'")
thread -= 1
data = requests.get("https://github.com/orgs/GXDE-OS/repos_list?q=&page=1", headers=dataHeaders).json()
# 获取页数
page = int(data["pageCount"])
data = requests.get("https://api.github.com/users/GXDE-OS/repos", headers=dataHeaders).json()
repoList = []
# 获取仓库列表
for i in range(1, page + 1):
pageData = requests.get(f"https://github.com/orgs/GXDE-OS/repos_list?q=&page={i}", headers=dataHeaders).json()
repositories = pageData["repositories"]
for j in repositories:
repoList.append(j["name"])
for i in data:
repoList.append(i["name"])
# 多线程处理以提升速度
thread = 0
threadMax = 32