From 413dc46f0cca2afaf39663a534a8cb3275b9982e Mon Sep 17 00:00:00 2001 From: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:52:34 -0400 Subject: [PATCH] Change PrivateRepos from int to int64 Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> --- github/github-accessors.go | 10 +++++----- github/github-accessors_test.go | 10 +++++----- github/github-stringify_test.go | 10 +++++----- github/orgs.go | 6 +++--- github/orgs_test.go | 2 +- github/users.go | 4 ++-- github/users_test.go | 6 +++--- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/github/github-accessors.go b/github/github-accessors.go index ca5cda6c283..92a952efb33 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -10879,7 +10879,7 @@ func (o *Organization) GetNodeID() string { } // GetOwnedPrivateRepos returns the OwnedPrivateRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetOwnedPrivateRepos() int { +func (o *Organization) GetOwnedPrivateRepos() int64 { if o == nil || o.OwnedPrivateRepos == nil { return 0 } @@ -10951,7 +10951,7 @@ func (o *Organization) GetSecretScanningPushProtectionEnabledForNewRepos() bool } // GetTotalPrivateRepos returns the TotalPrivateRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetTotalPrivateRepos() int { +func (o *Organization) GetTotalPrivateRepos() int64 { if o == nil || o.TotalPrivateRepos == nil { return 0 } @@ -12223,7 +12223,7 @@ func (p *Plan) GetName() string { } // GetPrivateRepos returns the PrivateRepos field if it's non-nil, zero value otherwise. -func (p *Plan) GetPrivateRepos() int { +func (p *Plan) GetPrivateRepos() int64 { if p == nil || p.PrivateRepos == nil { return 0 } @@ -20655,7 +20655,7 @@ func (u *User) GetOrganizationsURL() string { } // GetOwnedPrivateRepos returns the OwnedPrivateRepos field if it's non-nil, zero value otherwise. -func (u *User) GetOwnedPrivateRepos() int { +func (u *User) GetOwnedPrivateRepos() int64 { if u == nil || u.OwnedPrivateRepos == nil { return 0 } @@ -20759,7 +20759,7 @@ func (u *User) GetSuspendedAt() Timestamp { } // GetTotalPrivateRepos returns the TotalPrivateRepos field if it's non-nil, zero value otherwise. -func (u *User) GetTotalPrivateRepos() int { +func (u *User) GetTotalPrivateRepos() int64 { if u == nil || u.TotalPrivateRepos == nil { return 0 } diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index bcf8ee1f766..fae13c0ef97 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -12771,7 +12771,7 @@ func TestOrganization_GetNodeID(tt *testing.T) { } func TestOrganization_GetOwnedPrivateRepos(tt *testing.T) { - var zeroValue int + var zeroValue int64 o := &Organization{OwnedPrivateRepos: &zeroValue} o.GetOwnedPrivateRepos() o = &Organization{} @@ -12858,7 +12858,7 @@ func TestOrganization_GetSecretScanningPushProtectionEnabledForNewRepos(tt *test } func TestOrganization_GetTotalPrivateRepos(tt *testing.T) { - var zeroValue int + var zeroValue int64 o := &Organization{TotalPrivateRepos: &zeroValue} o.GetTotalPrivateRepos() o = &Organization{} @@ -14331,7 +14331,7 @@ func TestPlan_GetName(tt *testing.T) { } func TestPlan_GetPrivateRepos(tt *testing.T) { - var zeroValue int + var zeroValue int64 p := &Plan{PrivateRepos: &zeroValue} p.GetPrivateRepos() p = &Plan{} @@ -24112,7 +24112,7 @@ func TestUser_GetOrganizationsURL(tt *testing.T) { } func TestUser_GetOwnedPrivateRepos(tt *testing.T) { - var zeroValue int + var zeroValue int64 u := &User{OwnedPrivateRepos: &zeroValue} u.GetOwnedPrivateRepos() u = &User{} @@ -24239,7 +24239,7 @@ func TestUser_GetSuspendedAt(tt *testing.T) { } func TestUser_GetTotalPrivateRepos(tt *testing.T) { - var zeroValue int + var zeroValue int64 u := &User{TotalPrivateRepos: &zeroValue} u.GetTotalPrivateRepos() u = &User{} diff --git a/github/github-stringify_test.go b/github/github-stringify_test.go index 60052554970..8a78fb02429 100644 --- a/github/github-stringify_test.go +++ b/github/github-stringify_test.go @@ -998,8 +998,8 @@ func TestOrganization_String(t *testing.T) { Following: Int(0), CreatedAt: &Timestamp{}, UpdatedAt: &Timestamp{}, - TotalPrivateRepos: Int(0), - OwnedPrivateRepos: Int(0), + TotalPrivateRepos: Int64(0), + OwnedPrivateRepos: Int64(0), PrivateGists: Int(0), DiskUsage: Int(0), Collaborators: Int(0), @@ -1185,7 +1185,7 @@ func TestPlan_String(t *testing.T) { Name: String(""), Space: Int(0), Collaborators: Int(0), - PrivateRepos: Int(0), + PrivateRepos: Int64(0), FilledSeats: Int(0), Seats: Int(0), } @@ -1951,8 +1951,8 @@ func TestUser_String(t *testing.T) { SuspendedAt: &Timestamp{}, Type: String(""), SiteAdmin: Bool(false), - TotalPrivateRepos: Int(0), - OwnedPrivateRepos: Int(0), + TotalPrivateRepos: Int64(0), + OwnedPrivateRepos: Int64(0), PrivateGists: Int(0), DiskUsage: Int(0), Collaborators: Int(0), diff --git a/github/orgs.go b/github/orgs.go index 837dda89e0e..0c7e361b3fc 100644 --- a/github/orgs.go +++ b/github/orgs.go @@ -36,8 +36,8 @@ type Organization struct { Following *int `json:"following,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` - TotalPrivateRepos *int `json:"total_private_repos,omitempty"` - OwnedPrivateRepos *int `json:"owned_private_repos,omitempty"` + TotalPrivateRepos *int64 `json:"total_private_repos,omitempty"` + OwnedPrivateRepos *int64 `json:"owned_private_repos,omitempty"` PrivateGists *int `json:"private_gists,omitempty"` DiskUsage *int `json:"disk_usage,omitempty"` Collaborators *int `json:"collaborators,omitempty"` @@ -121,7 +121,7 @@ type Plan struct { Name *string `json:"name,omitempty"` Space *int `json:"space,omitempty"` Collaborators *int `json:"collaborators,omitempty"` - PrivateRepos *int `json:"private_repos,omitempty"` + PrivateRepos *int64 `json:"private_repos,omitempty"` FilledSeats *int `json:"filled_seats,omitempty"` Seats *int `json:"seats,omitempty"` } diff --git a/github/orgs_test.go b/github/orgs_test.go index 1205ad00046..ca85af25b71 100644 --- a/github/orgs_test.go +++ b/github/orgs_test.go @@ -452,7 +452,7 @@ func TestPlan_Marshal(t *testing.T) { Name: String("name"), Space: Int(1), Collaborators: Int(1), - PrivateRepos: Int(1), + PrivateRepos: Int64(1), FilledSeats: Int(1), Seats: Int(1), } diff --git a/github/users.go b/github/users.go index d40d23e90fe..1b0670103b3 100644 --- a/github/users.go +++ b/github/users.go @@ -41,8 +41,8 @@ type User struct { SuspendedAt *Timestamp `json:"suspended_at,omitempty"` Type *string `json:"type,omitempty"` SiteAdmin *bool `json:"site_admin,omitempty"` - TotalPrivateRepos *int `json:"total_private_repos,omitempty"` - OwnedPrivateRepos *int `json:"owned_private_repos,omitempty"` + TotalPrivateRepos *int64 `json:"total_private_repos,omitempty"` + OwnedPrivateRepos *int64 `json:"owned_private_repos,omitempty"` PrivateGists *int `json:"private_gists,omitempty"` DiskUsage *int `json:"disk_usage,omitempty"` Collaborators *int `json:"collaborators,omitempty"` diff --git a/github/users_test.go b/github/users_test.go index 96b2e926f18..f71df5cfd9e 100644 --- a/github/users_test.go +++ b/github/users_test.go @@ -84,8 +84,8 @@ func TestUser_Marshal(t *testing.T) { SuspendedAt: &Timestamp{referenceTime}, Type: String("test type"), SiteAdmin: Bool(false), - TotalPrivateRepos: Int(2), - OwnedPrivateRepos: Int(1), + TotalPrivateRepos: Int64(2), + OwnedPrivateRepos: Int64(1), PrivateGists: Int(1), DiskUsage: Int(1), Collaborators: Int(1), @@ -94,7 +94,7 @@ func TestUser_Marshal(t *testing.T) { Name: String("silver"), Space: Int(1024), Collaborators: Int(10), - PrivateRepos: Int(4), + PrivateRepos: Int64(4), FilledSeats: Int(24), Seats: Int(1), },