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