From 8cd9e347fae7e6e4a2f422c5e6f56135ae7f1124 Mon Sep 17 00:00:00 2001 From: tomfeigin <10672011+tomfeigin@users.noreply.github.com> Date: Sun, 7 Dec 2025 09:02:06 +0200 Subject: [PATCH] fix: org usage report response decode --- github/billing.go | 2 +- github/billing_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/github/billing.go b/github/billing.go index bb6f8ec49ea..8a0e55c02bf 100644 --- a/github/billing.go +++ b/github/billing.go @@ -121,7 +121,7 @@ type UsageItem struct { Date string `json:"date"` Product string `json:"product"` SKU string `json:"sku"` - Quantity int `json:"quantity"` + Quantity float64 `json:"quantity"` UnitType string `json:"unitType"` PricePerUnit float64 `json:"pricePerUnit"` GrossAmount float64 `json:"grossAmount"` diff --git a/github/billing_test.go b/github/billing_test.go index 7d1baa9719f..fdd7c471972 100644 --- a/github/billing_test.go +++ b/github/billing_test.go @@ -407,7 +407,7 @@ func TestBillingService_GetOrganizationUsageReport(t *testing.T) { Date: "2023-08-01", Product: "Actions", SKU: "Actions Linux", - Quantity: 100, + Quantity: 100.0, UnitType: "minutes", PricePerUnit: 0.008, GrossAmount: 0.8, @@ -488,7 +488,7 @@ func TestBillingService_GetUsageReport(t *testing.T) { Date: "2023-08-15", Product: "Codespaces", SKU: "Codespaces Linux", - Quantity: 50, + Quantity: 50.0, UnitType: "hours", PricePerUnit: 0.18, GrossAmount: 9.0,