feat: add Copilot enterprise usage reporting scripts - #169
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.mdandgh-cli/README.mdto 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gh authcredential and provide access guidance for 404 responsesValidation
bash -nfor both shell scriptsgh-cliandscripts