mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
fix # of stargazers and forks on projects
This commit is contained in:
parent
160952965d
commit
468b366145
1 changed files with 6 additions and 16 deletions
|
|
@ -77,6 +77,12 @@
|
|||
var d = new Date(repo.updatedAt)
|
||||
var updated = d.getDate() + ' ' + Months[d.getMonth()] + ', ' + d.getFullYear()
|
||||
text('updated', updated)
|
||||
|
||||
data.set('stars', repo.stargazersCount)
|
||||
updateStars(repo.stargazersCount)
|
||||
|
||||
data.set('forks', repo.forksCount)
|
||||
updateN('fork', repo.forksCount)
|
||||
})
|
||||
.fetchLanguages(function(err, langs) {
|
||||
if (err) {
|
||||
|
|
@ -94,22 +100,6 @@
|
|||
updateContributors(users)
|
||||
}
|
||||
})
|
||||
.fetchWatchers(function(err, users) {
|
||||
if (err) {
|
||||
text('nstar', '?')
|
||||
} else {
|
||||
data.set('stars', users)
|
||||
updateStars(users.length)
|
||||
}
|
||||
})
|
||||
.fetchForks(function(err, repos) {
|
||||
if (err) {
|
||||
text('nfork', '?')
|
||||
} else {
|
||||
data.set('forks', repos)
|
||||
updateN('fork', repos.length)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('hit ' + t + ' (' + (+new Date() - t) + ')')
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue