refactor: refactor repo card (#1325)

* refactor: refactored repo-card

* test: fix tests

* test: fixed tests

* fix: unprovided description error
This commit is contained in:
Anurag Hazra
2021-09-26 21:02:27 +05:30
committed by GitHub
parent ec8eb0c893
commit 62d65ab483
7 changed files with 140 additions and 77 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ module.exports = async (req, res) => {
and if both are zero we are not showing the stats
so we can just make the cache longer, since there is no need to frequent updates
*/
const stars = repoData.stargazers.totalCount;
const stars = repoData.starCount;
const forks = repoData.forkCount;
const isBothOver1K = stars > 1000 && forks > 1000;
const isBothUnder1 = stars < 1 && forks < 1;