mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Close #75. Github no longer crashes on network failure
This commit is contained in:
parent
7bf2ad88cf
commit
86d43e9af6
@ -37,6 +37,10 @@ func (repo *GithubRepo) Refresh() {
|
||||
/* -------------------- Counts -------------------- */
|
||||
|
||||
func (repo *GithubRepo) IssueCount() int {
|
||||
if repo.RemoteRepo == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
return *repo.RemoteRepo.OpenIssuesCount
|
||||
}
|
||||
|
||||
@ -45,6 +49,10 @@ func (repo *GithubRepo) PullRequestCount() int {
|
||||
}
|
||||
|
||||
func (repo *GithubRepo) StarCount() int {
|
||||
if repo.RemoteRepo == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
return *repo.RemoteRepo.StargazersCount
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user