You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7f661a9
Browse filesBrowse the repository at this point in the historyBrowse files
Patrick Lewis
committed
Add GitHub repository permissions and Copilot reports scripts with detailed usage instructions
Exports repository user/team permissions to CSV and identifies who can bypass pull request approval requirements, from both branch protection rules and repository rulesets.
244
+
245
+
**Prerequisites:**
246
+
-**[gh](https://cli.github.com)** — GitHub CLI (authenticated via `gh auth login`)
Generates a GitHub Copilot Enterprise licence and usage report. Shows every licensed user, their plan type, pool credit contribution, and actual AI credit consumption for the current billing month. Optionally enriches data with Entra ID department information.
280
+
281
+
**Prerequisites:**
282
+
-**[gh](https://cli.github.com)** — GitHub CLI authenticated with `read:enterprise` and `manage_billing:enterprise` scopes
283
+
-**[az](https://learn.microsoft.com/en-us/cli/azure/)** — Azure CLI (optional, for Entra ID department enrichment)
- Fetches all Copilot seats across the enterprise (deduplicated by user)
312
+
- Fetches per-user AI credit consumption for the current billing month
313
+
- Fetches enterprise-level model usage metrics (last 28 days)
314
+
- Optionally enriches each user with Entra ID department and job title via `az rest`
315
+
- Outputs a CSV and a formatted console summary with department breakdown and model usage tables
316
+
317
+
> [!IMPORTANT]
318
+
> Requires an enterprise owner or billing manager token. Run `gh auth refresh --scopes "read:enterprise,manage_billing:enterprise"` before executing.
319
+
320
+
> [!NOTE]
321
+
> Uses the `gh` CLI and (optionally) the `az` CLI. The Entra ID enrichment is skipped automatically if `az` is not logged in, or can be disabled with `--no-entra`.
0 commit comments