Skip to content

feat(billing): add data sources github_organization_billing_packages and github_organization_billing_storage #75

@vmvarela

Description

@vmvarela

Description

Add two read-only data sources for classic billing at the organization level:

  • github_organization_billing_packages — free/paid storage for GitHub Packages
  • github_organization_billing_storage — estimated storage used by Actions artifacts and Packages

These are part of the classic billing platform (pre-enhanced billing) and useful for orgs not yet on the enhanced platform.

go-github v84 API

func (s *BillingService) GetOrganizationPackagesBilling(ctx context.Context, org string) (*PackagesBilling, *Response, error)
// GET /orgs/{org}/settings/billing/packages

func (s *BillingService) GetOrganizationStorageBilling(ctx context.Context, org string) (*StorageBilling, *Response, error)
// GET /orgs/{org}/settings/billing/shared-storage

Structs

  • PackagesBilling: TotalGigabytesBandwidthUsed, TotalPaidGigabytesBandwidthUsed, IncludedGigabytesBandwidth
  • StorageBilling: DaysLeftInBillingCycle, EstimatedPaidStorageForMonth, EstimatedStorageForMonth

Acceptance Criteria

  • Two data sources implemented with owner (required) and computed output fields
  • Both registered in provider.go
  • Docs for each under website/docs/d/
  • Acceptance tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions