Skip to content

Commit

Permalink
Change StorageBilling.EstimatedPaidStorageForMonth from int to float64 (
Browse files Browse the repository at this point in the history
#2205)

Fixes: #2203.
  • Loading branch information
gunadhya committed Nov 15, 2021
1 parent e458912 commit ca2f3c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions github/billing.go
Expand Up @@ -39,9 +39,9 @@ type PackageBilling struct {

// StorageBilling represents a GitHub Storage billing.
type StorageBilling struct {
DaysLeftInBillingCycle int `json:"days_left_in_billing_cycle"`
EstimatedPaidStorageForMonth int `json:"estimated_paid_storage_for_month"`
EstimatedStorageForMonth int `json:"estimated_storage_for_month"`
DaysLeftInBillingCycle int `json:"days_left_in_billing_cycle"`
EstimatedPaidStorageForMonth float64 `json:"estimated_paid_storage_for_month"`
EstimatedStorageForMonth int `json:"estimated_storage_for_month"`
}

// GetActionsBillingOrg returns the summary of the free and paid GitHub Actions minutes used for an Org.
Expand Down
8 changes: 4 additions & 4 deletions github/billing_test.go
Expand Up @@ -120,7 +120,7 @@ func TestBillingService_GetStorageBillingOrg(t *testing.T) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{
"days_left_in_billing_cycle": 20,
"estimated_paid_storage_for_month": 15,
"estimated_paid_storage_for_month": 15.25,
"estimated_storage_for_month": 40
}`)
})
Expand All @@ -133,7 +133,7 @@ func TestBillingService_GetStorageBillingOrg(t *testing.T) {

want := &StorageBilling{
DaysLeftInBillingCycle: 20,
EstimatedPaidStorageForMonth: 15,
EstimatedPaidStorageForMonth: 15.25,
EstimatedStorageForMonth: 40,
}
if !cmp.Equal(hook, want) {
Expand Down Expand Up @@ -262,7 +262,7 @@ func TestBillingService_GetStorageBillingUser(t *testing.T) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{
"days_left_in_billing_cycle": 20,
"estimated_paid_storage_for_month": 15,
"estimated_paid_storage_for_month": 15.25,
"estimated_storage_for_month": 40
}`)
})
Expand All @@ -275,7 +275,7 @@ func TestBillingService_GetStorageBillingUser(t *testing.T) {

want := &StorageBilling{
DaysLeftInBillingCycle: 20,
EstimatedPaidStorageForMonth: 15,
EstimatedPaidStorageForMonth: 15.25,
EstimatedStorageForMonth: 40,
}
if !cmp.Equal(hook, want) {
Expand Down

0 comments on commit ca2f3c2

Please sign in to comment.