Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96d37c7

Browse files
committed
fix: fixed stars count anuraghazra#39 & fixed progressbar percentage
1 parent 3a24ad6 commit 96d37c7

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/fetchStats.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const fetcher = (variables, token) => {
2626
followers {
2727
totalCount
2828
}
29-
repositories(first: 100, orderBy: { direction: DESC, field: STARGAZERS }) {
29+
repositories(first: 100, ownerAffiliations: OWNER, isFork: false, orderBy: {direction: DESC, field: STARGAZERS}) {
3030
totalCount
3131
nodes {
3232
stargazers {

src/renderStatsCard.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,9 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
127127
</text>
128128
</g>`;
129129

130-
// re-adjust circle progressbar's value until the ranking algo is improved
131-
let progress = rank.score;
132-
if (rank.score > 86) {
133-
progress = (40 + rank.score) * 0.6;
134-
}
135-
if (rank.score < 40) {
136-
progress = 40 + rank.score;
137-
}
130+
// the better user's score the the rank will be closer to zero so
131+
// subtracting 100 to get the progress in 100%
132+
let progress = 100 - rank.score;
138133

139134
const styles = getStyles({
140135
titleColor,

0 commit comments

Comments
 (0)