Skip to content

Commit ca2f3c2

Browse files
authored
Change StorageBilling.EstimatedPaidStorageForMonth from int to float64 (#2205)
Fixes: #2203.
1 parent e458912 commit ca2f3c2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

github/billing.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ type PackageBilling struct {
3939

4040
// StorageBilling represents a GitHub Storage billing.
4141
type StorageBilling struct {
42-
DaysLeftInBillingCycle int `json:"days_left_in_billing_cycle"`
43-
EstimatedPaidStorageForMonth int `json:"estimated_paid_storage_for_month"`
44-
EstimatedStorageForMonth int `json:"estimated_storage_for_month"`
42+
DaysLeftInBillingCycle int `json:"days_left_in_billing_cycle"`
43+
EstimatedPaidStorageForMonth float64 `json:"estimated_paid_storage_for_month"`
44+
EstimatedStorageForMonth int `json:"estimated_storage_for_month"`
4545
}
4646

4747
// GetActionsBillingOrg returns the summary of the free and paid GitHub Actions minutes used for an Org.

github/billing_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func TestBillingService_GetStorageBillingOrg(t *testing.T) {
120120
testMethod(t, r, "GET")
121121
fmt.Fprint(w, `{
122122
"days_left_in_billing_cycle": 20,
123-
"estimated_paid_storage_for_month": 15,
123+
"estimated_paid_storage_for_month": 15.25,
124124
"estimated_storage_for_month": 40
125125
}`)
126126
})
@@ -133,7 +133,7 @@ func TestBillingService_GetStorageBillingOrg(t *testing.T) {
133133

134134
want := &StorageBilling{
135135
DaysLeftInBillingCycle: 20,
136-
EstimatedPaidStorageForMonth: 15,
136+
EstimatedPaidStorageForMonth: 15.25,
137137
EstimatedStorageForMonth: 40,
138138
}
139139
if !cmp.Equal(hook, want) {
@@ -262,7 +262,7 @@ func TestBillingService_GetStorageBillingUser(t *testing.T) {
262262
testMethod(t, r, "GET")
263263
fmt.Fprint(w, `{
264264
"days_left_in_billing_cycle": 20,
265-
"estimated_paid_storage_for_month": 15,
265+
"estimated_paid_storage_for_month": 15.25,
266266
"estimated_storage_for_month": 40
267267
}`)
268268
})
@@ -275,7 +275,7 @@ func TestBillingService_GetStorageBillingUser(t *testing.T) {
275275

276276
want := &StorageBilling{
277277
DaysLeftInBillingCycle: 20,
278-
EstimatedPaidStorageForMonth: 15,
278+
EstimatedPaidStorageForMonth: 15.25,
279279
EstimatedStorageForMonth: 40,
280280
}
281281
if !cmp.Equal(hook, want) {

0 commit comments

Comments
 (0)