Skip to content

Commit 3c06fc1

Browse files
authored
fix!: Remove unused Stats field from Commit struct (#3395)
BREAKING CHANGE: The unused `Stats` field is removed from the `Commit` struct. Fixes: #3394.
1 parent c4a49db commit 3c06fc1

7 files changed

+1
-49
lines changed

github/git_commits.go

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ type Commit struct {
4949
Message *string `json:"message,omitempty"`
5050
Tree *Tree `json:"tree,omitempty"`
5151
Parents []*Commit `json:"parents,omitempty"`
52-
Stats *CommitStats `json:"stats,omitempty"`
5352
HTMLURL *string `json:"html_url,omitempty"`
5453
URL *string `json:"url,omitempty"`
5554
Verification *SignatureVerification `json:"verification,omitempty"`

github/git_commits_test.go

-10
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ func TestCommit_Marshal(t *testing.T) {
7171
Truncated: Ptr(false),
7272
},
7373
Parents: nil,
74-
Stats: &CommitStats{
75-
Additions: Ptr(1),
76-
Deletions: Ptr(1),
77-
Total: Ptr(1),
78-
},
7974
HTMLURL: Ptr("h"),
8075
URL: Ptr("u"),
8176
Verification: &SignatureVerification{
@@ -118,11 +113,6 @@ func TestCommit_Marshal(t *testing.T) {
118113
],
119114
"truncated": false
120115
},
121-
"stats": {
122-
"additions": 1,
123-
"deletions": 1,
124-
"total": 1
125-
},
126116
"html_url": "h",
127117
"url": "u",
128118
"verification": {

github/github-accessors.go

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-stringify_test.go

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/repos_commits_test.go

-10
Original file line numberDiff line numberDiff line change
@@ -714,11 +714,6 @@ func TestBranchCommit_Marshal(t *testing.T) {
714714
Truncated: Ptr(false),
715715
},
716716
Parents: nil,
717-
Stats: &CommitStats{
718-
Additions: Ptr(1),
719-
Deletions: Ptr(1),
720-
Total: Ptr(1),
721-
},
722717
HTMLURL: Ptr("h"),
723718
URL: Ptr("u"),
724719
Verification: &SignatureVerification{
@@ -765,11 +760,6 @@ func TestBranchCommit_Marshal(t *testing.T) {
765760
],
766761
"truncated": false
767762
},
768-
"stats": {
769-
"additions": 1,
770-
"deletions": 1,
771-
"total": 1
772-
},
773763
"html_url": "h",
774764
"url": "u",
775765
"verification": {

github/repos_contents_test.go

-10
Original file line numberDiff line numberDiff line change
@@ -894,11 +894,6 @@ func TestRepositoryContentResponse_Marshal(t *testing.T) {
894894
Truncated: Ptr(false),
895895
},
896896
Parents: nil,
897-
Stats: &CommitStats{
898-
Additions: Ptr(1),
899-
Deletions: Ptr(1),
900-
Total: Ptr(1),
901-
},
902897
HTMLURL: Ptr("h"),
903898
URL: Ptr("u"),
904899
Verification: &SignatureVerification{
@@ -958,11 +953,6 @@ func TestRepositoryContentResponse_Marshal(t *testing.T) {
958953
],
959954
"truncated": false
960955
},
961-
"stats": {
962-
"additions": 1,
963-
"deletions": 1,
964-
"total": 1
965-
},
966956
"html_url": "h",
967957
"url": "u",
968958
"verification": {

0 commit comments

Comments
 (0)