Skip to content

Commit

Permalink
fix!: Remove unused Stats field from Commit struct (#3395)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The unused `Stats` field is removed from the `Commit` struct.

Fixes: #3394.
  • Loading branch information
acouvreur authored Dec 18, 2024
1 parent c4a49db commit 3c06fc1
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 49 deletions.
1 change: 0 additions & 1 deletion github/git_commits.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ type Commit struct {
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"`
Expand Down
10 changes: 0 additions & 10 deletions github/git_commits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ func TestCommit_Marshal(t *testing.T) {
Truncated: Ptr(false),
},
Parents: nil,
Stats: &CommitStats{
Additions: Ptr(1),
Deletions: Ptr(1),
Total: Ptr(1),
},
HTMLURL: Ptr("h"),
URL: Ptr("u"),
Verification: &SignatureVerification{
Expand Down Expand Up @@ -118,11 +113,6 @@ func TestCommit_Marshal(t *testing.T) {
],
"truncated": false
},
"stats": {
"additions": 1,
"deletions": 1,
"total": 1
},
"html_url": "h",
"url": "u",
"verification": {
Expand Down
8 changes: 0 additions & 8 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions github/github-stringify_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions github/repos_commits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,11 +714,6 @@ func TestBranchCommit_Marshal(t *testing.T) {
Truncated: Ptr(false),
},
Parents: nil,
Stats: &CommitStats{
Additions: Ptr(1),
Deletions: Ptr(1),
Total: Ptr(1),
},
HTMLURL: Ptr("h"),
URL: Ptr("u"),
Verification: &SignatureVerification{
Expand Down Expand Up @@ -765,11 +760,6 @@ func TestBranchCommit_Marshal(t *testing.T) {
],
"truncated": false
},
"stats": {
"additions": 1,
"deletions": 1,
"total": 1
},
"html_url": "h",
"url": "u",
"verification": {
Expand Down
10 changes: 0 additions & 10 deletions github/repos_contents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,11 +894,6 @@ func TestRepositoryContentResponse_Marshal(t *testing.T) {
Truncated: Ptr(false),
},
Parents: nil,
Stats: &CommitStats{
Additions: Ptr(1),
Deletions: Ptr(1),
Total: Ptr(1),
},
HTMLURL: Ptr("h"),
URL: Ptr("u"),
Verification: &SignatureVerification{
Expand Down Expand Up @@ -958,11 +953,6 @@ func TestRepositoryContentResponse_Marshal(t *testing.T) {
],
"truncated": false
},
"stats": {
"additions": 1,
"deletions": 1,
"total": 1
},
"html_url": "h",
"url": "u",
"verification": {
Expand Down

0 comments on commit 3c06fc1

Please sign in to comment.