Skip to content

feat: add Copilot enterprise usage reporting scripts - #169

Merged
joshjohanning merged 2 commits into
mainfrom
feat/copilot-usage-reporting
Aug 7, 2026
Merged

feat: add Copilot enterprise usage reporting scripts#169
joshjohanning merged 2 commits into
mainfrom
feat/copilot-usage-reporting

Conversation

@joshjohanning

Copy link
Copy Markdown
Owner

Summary

  • add a monthly enterprise usage report with weekly CSV and standalone HTML output
  • add a per-user and model AI credit usage export
  • use the active gh auth credential and provide access guidance for 404 responses
  • document both scripts and their API limitations

Validation

  • bash -n for both shell scripts
  • repository README lint for gh-cli and scripts

Copilot AI lite review requested due to automatic review settings August 7, 2026 00:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds two new automation scripts to generate GitHub Copilot enterprise usage reporting outputs, along with README documentation updates so the scripts are discoverable and their limitations/permissions are clear.

Changes:

  • Added a scripts/ utility to generate a monthly enterprise usage report with weekly CSV and a standalone HTML report
  • Added a gh-cli/ utility to export monthly Copilot AI credit usage broken down by user and model
  • Updated scripts/README.md and gh-cli/README.md to document the new scripts and key API constraints
Show a summary per file
File Description
scripts/README.md Adds the new usage-report script entry to the scripts index
scripts/copilot-enterprise-usage-report/README.md Documents outputs, prerequisites, permissions, and usage for the new report script
scripts/copilot-enterprise-usage-report/copilot-enterprise-usage-report.sh New script that downloads daily enterprise metrics and produces weekly CSV + self-contained HTML
gh-cli/README.md Documents the new AI credit usage export script and its rate-limit implications
gh-cli/get-copilot-ai-credit-usage-by-user-and-model.sh New script that identifies users with AI credit usage via daily metrics then exports per-user per-model billing usage

Review details

Suppressed comments (1)

scripts/copilot-enterprise-usage-report/README.md:38

  • The Usage section includes both a generic invocation and a separate example block. To match the repository README guidance (keep just one), consider combining them into a single snippet and removing the separate Example block.
Example:

```shell
./copilot-enterprise-usage-report.sh avocado-corp 2026 7
</details>


- **Files reviewed:** 5/5 changed files
- **Comments generated:** 5
- **Review effort level:** Lite


Comment thread scripts/copilot-enterprise-usage-report/README.md Outdated
Comment thread scripts/copilot-enterprise-usage-report/copilot-enterprise-usage-report.sh Outdated
Comment thread scripts/copilot-enterprise-usage-report/copilot-enterprise-usage-report.sh Outdated
Comment thread gh-cli/get-copilot-ai-credit-usage-by-user-and-model.sh
@joshjohanning joshjohanning changed the title Add Copilot enterprise usage reporting scripts feat: add Copilot enterprise usage reporting scripts Aug 7, 2026
@joshjohanning
joshjohanning merged commit 7b2fb63 into main Aug 7, 2026
6 checks passed
@joshjohanning
joshjohanning deleted the feat/copilot-usage-reporting branch August 7, 2026 01:05
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.

2 participants