From 1e55bf6be814270d7cc31a60868c4bd89e4e68c0 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sun, 11 Jan 2015 16:03:37 -0800 Subject: [PATCH] Add CommentCount to Commit. This integer exposes the number of comments that have been posted for that commit on GitHub. It is documented at https://developer.github.com/v3/repos/commits/. --- github/git_commits.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/github/git_commits.go b/github/git_commits.go index 90194c8..6584b77 100644 --- a/github/git_commits.go +++ b/github/git_commits.go @@ -20,6 +20,11 @@ type Commit struct { Parents []Commit `json:"parents,omitempty"` Stats *CommitStats `json:"stats,omitempty"` URL *string `json:"url,omitempty"` + + // CommentCount is the number of GitHub comments on the commit. This + // is only populated for requests that fetch GitHub data like + // Pulls.ListCommits, Repositories.ListCommits, etc. + CommentCount *int `json:"comment_count,omitempty"` } func (c Commit) String() string {