diff --git a/github/github_repo.go b/github/github_repo.go index df3644d2..7ced9123 100644 --- a/github/github_repo.go +++ b/github/github_repo.go @@ -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 }