mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-22 21:27:43 +08:00
This commit is contained in:
parent
1d0f0a2539
commit
5a2990770c
@ -84,16 +84,16 @@ async function getGithubStats() {
|
||||
}
|
||||
|
||||
async function getRepoStats() {
|
||||
// 两个接口各数据,哪个大取哪个
|
||||
// 两个接口各数据,加和返回
|
||||
const githubStats = await getGithubStats();
|
||||
const giteaStats = await getGiteaStats();
|
||||
return {
|
||||
stars: Math.max(githubStats.stars, giteaStats.stars),
|
||||
forks: Math.max(githubStats.forks, giteaStats.forks),
|
||||
watchers: Math.max(githubStats.watchers, giteaStats.watchers),
|
||||
issues: Math.max(githubStats.issues, giteaStats.issues),
|
||||
prs: Math.max(githubStats.prs, giteaStats.prs),
|
||||
size: Math.max(githubStats.size, giteaStats.size),
|
||||
stars: githubStats.stars + giteaStats.stars,
|
||||
forks: githubStats.forks + giteaStats.forks,
|
||||
watchers: githubStats.watchers + giteaStats.watchers,
|
||||
issues: githubStats.issues + giteaStats.issues,
|
||||
prs: githubStats.prs + giteaStats.prs,
|
||||
size: githubStats.size + giteaStats.size,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user