Skip to content

feat(billing): add data sources for Advanced Security active committers (enterprise + org) #76

@vmvarela

Description

@vmvarela

Description

Add two data sources to expose GitHub Advanced Security (GHAS) active committer counts, useful for license management and compliance reporting:

  • github_enterprise_billing_advanced_security — GHAS active committers for an enterprise
  • github_organization_billing_advanced_security — GHAS active committers for an organization

go-github v84 API

func (s *BillingService) GetOrganizationAdvancedSecurityActiveCommitters(ctx context.Context, org string, opts *ActiveCommittersListOptions) (*ActiveCommitters, *Response, error)
// GET /orgs/{org}/settings/billing/advanced-security

Note: Enterprise variant uses the same ActiveCommitters struct — check if go-github v84 exposes an enterprise endpoint or if it must be called via custom request.

Structs

type ActiveCommitters struct {
    TotalAdvancedSecurityCommitters *int
    TotalCount                      *int
    Repositories                    []*AdvancedSecurityRepository
}
type AdvancedSecurityRepository struct {
    Name            *string
    AdvancedSecurityCommitters *int
    AdvancedSecurityCommittersBreakdown []*AdvancedSecurityCommittersBreakdown
}

Acceptance Criteria

  • github_organization_billing_advanced_security data source implemented
  • github_enterprise_billing_advanced_security data source implemented (verify endpoint availability)
  • Schema: owner/enterprise_slug, pagination options
  • Computed: total_advanced_security_committers, total_count, repositories list
  • Both registered in provider.go
  • Docs for each

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:highMust be in the next sprintsize:mMedium — 4 to 8 hourstype:featureNew functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions