Skip to content

feat: improve billing report SKU names, number formatting and layout - #71

Merged
locus313 merged 1 commit into
mainfrom
feature/billing-report-layout-and-formatting
Nov 13, 2026
Merged

locus313 merged 1 commit into
mainfrom
feature/billing-report-layout-and-formatting

Conversation

@locus313

Copy link
Copy Markdown
Owner

Description

Improves how github-enterprise-billing-report reads and lays out its output:

  • Wraps the report body in <main> so a BRAND_CSS stylesheet can lay out a full-width header and footer.
  • Names Actions runner SKUs from their code (for example actions_linux_4_core becomes "Linux 4-core runner minutes"), so new runner sizes get a readable name without a code change.
  • Names the Copilot premium request SKU and aligns "Copilot AI Credits" with "Copilot AI usage".
  • Adds thousands separators to money amounts and billed quantities ($4,753.00, 1,098 minutes). The CSV keeps raw numbers.
  • Leaves usage with a repository but no organization out of the repository ranking. It previously showed as /my-repo next to my-org/my-repo; the amount is still counted in the Enterprise account table.
  • Explains in the Enterprise account section that charges returned without organization detail can shrink over time.

Changes

  • Modified: reporting/github-enterprise-billing-report/github-enterprise-billing-report.sh
  • Other: docs/script-behaviors.md

How to test

export GITHUB_TOKEN=ghp_REDACTED
export GITHUB_ENTERPRISE=my-enterprise
MONTHS=12 ./reporting/github-enterprise-billing-report/github-enterprise-billing-report.sh

Open the HTML report and check that amounts of $1,000 or more have separators, Actions SKUs have readable names, each repository appears once in the top repositories table, and BRAND_CSS styling applies to the header and footer. bats tests/ and shellcheck pass.

Checklist

  • set -euo pipefail is the first executable line after the # === header
  • Script sources lib/github-common.sh via SCRIPT_DIR
  • All required env vars validated with require_env_var
  • Token validated with validate_github_token
  • User-supplied slugs validated with validate_slug
  • README.md and docs/script-behaviors.md updated where behavior changed
  • Script header comment matches README documentation
  • shellcheck passes (shellcheck --severity=warning --exclude=SC2034,SC1091 --shell=bash <script>)

Name Actions runner and Copilot premium request SKUs, add thousands separators to amounts and quantities, wrap the report body in main for branded layouts, and drop org-less repository usage from the repository ranking.
@locus313
locus313 merged commit 8ac25d2 into main Nov 13, 2026
2 checks passed
@locus313
locus313 deleted the feature/billing-report-layout-and-formatting branch November 13, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant