This plugin ingests GitHub Copilot organization-level adoption metrics (daily usage and seat assignments) and provides a Grafana dashboard for adoption trends.
It follows the same structure/patterns as other DevLake data-source plugins (notably backend/plugins/q_dev).
Phase 1 endpoints (GitHub Copilot REST API):
GET /orgs/{org}/copilot/billingGET /orgs/{org}/copilot/billing/seatsGET /orgs/{org}/copilot/metricsStored data (tool layer):
_tool_copilot_org_metrics (daily aggregates)_tool_copilot_language_metrics (editor/language breakdown)_tool_copilot_seats (seat assignments)flowchart LR GH[GitHub Copilot REST API] RAW[(Raw tables\n_raw_copilot_*)] TOOL[(Tool tables\n_tool_copilot_*)] GRAF[Grafana Dashboard\nGitHub Copilot Adoption] GH --> RAW --> TOOL --> GRAF
api/ – REST layer for connections/scopesimpl/ – plugin meta, options, connection helpersmodels/ – tool-layer models + migrationstasks/ – collectors/extractors and pipeline registratione2e/ – E2E fixtures and golden CSV assertionsdocs/ – documentation assetsmanage_billing:copilot works)GitHub Copilot Octodemohttps://api.github.comGET /orgs/{org}/copilot/billing).Add an organization scope for that connection. For Phase 1, implementationDate is optional.
Use a blueprint plan like:
[ [ { "plugin": "gh-copilot", "options": { "connectionId": 1, "scopeId": "octodemo" } } ] ]
Run the blueprint daily to keep metrics up to date.
The Grafana dashboard JSON is in grafana/dashboards/copilot/adoption.json.
Link: grafana/dashboards/copilot/adoption.json
403 Forbidden → token missing required billing/metrics scope, or org lacks GitHub Copilot access
404 Not Found → incorrect org slug, or GitHub Copilot endpoints unavailable for the org
422 Unprocessable Entity → GitHub Copilot metrics disabled in GitHub org settings
429 Too Many Requests → respect Retry-After; collectors implement backoff/retry
Tokens are sanitized before persisting. When patching an existing connection, omit the token to retain the encrypted value already stored in DevLake.
specs/001-copilot-metrics-plugin/quickstart.md