8000 `CommitStats` in the `Commit` struct is always nil · Issue #3394 · google/go-github · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
CommitStats in the Commit struct is always nil #3394
Closed
@acouvreur

Description

@acouvreur

The CommitStats in the Commit struct is always nil.

Comparing the current Commit struct:

// Commit represents a GitHub commit.
type Commit struct {
SHA *string `json:"sha,omitempty"`
Author *CommitAuthor `json:"author,omitempty"`
Committer *CommitAuthor `json:"committer,omitempty"`
Message *string `json:"message,omitempty"`
Tree *Tree `json:"tree,omitempty"`
Parents []*Commit `json:"parents,omitempty"`
Stats *CommitStats `json:"stats,omitempty"`
HTMLURL *string `json:"html_url,omitempty"`
URL *string `json:"url,omitempty"`
Verification *SignatureVerification `json:"verification,omitempty"`
NodeID *string `json:"node_id,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"`
}

With the GitHub OpenAPI Spec:
Image

The Stats field is not on the OpenAPI Contract.


I know that structs can be used to represents objects that look alike a lot (hence the CommentCount field).

So I'm not sure if the Stats field is also one of these exceptions. If that's the case, it should be explained just like CommentCount.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0