Skip to content

Conversation

@ewega
Copy link
Contributor

@ewega ewega commented Jan 5, 2026

⚠️ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

  • I have read through the Contributing Documentation.
  • I have added relevant tests.
  • I have added relevant documentation.
  • I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

This PR adds a new copilot data-source plugin that ingests GitHub Copilot organization-level adoption metrics and ships a Grafana Adoption dashboard powered by tool-layer tables.

Key capabilities in this branch:

GitHub Copilot Plugin Implementation:

  • Added the initial codebase for the gh-copilot plugin, including API handlers for connections (connection.go), scopes (scope.go), blueprint pipeline plan generation (blueprint_v200.go), and connection testing (test_connection.go). These handlers support creating, updating, deleting, listing, and validating Copilot connections and organization scopes. [1] [2] [3] [4]
  • Introduced plugin initialization logic (init.go) to register API endpoints and helpers, and provided a standalone entrypoint for debugging collectors (copilot.go). [1] [2]

Validation and Testing Enhancements:

  • Implemented connection validation logic to ensure required fields and constraints, with corresponding unit tests to verify error handling for missing or invalid parameters. [1] [2]

Documentation:

  • Added a detailed README.md for the gh-copilot plugin, describing its purpose, setup, endpoints, data flow, limitations, and troubleshooting guidance.

Build and Docker Improvements:

  • Updated .dockerignore to exclude common files, editor settings, and build outputs, improving Docker build performance and cleanliness.
  • Enhanced the backend/Dockerfile to normalize shell scripts (convert line endings and set executable permissions) and ensure correct ownership for Python files, improving cross-platform compatibility and container reliability. [1] [2]

Does this close any open issues?

#8664

Screenshots

image image

Other Information

TODOs:

  • GitHub Copilot logo

Eldrick Wega and others added 30 commits December 5, 2025 15:30
Add .specify/ directory with:
- memory/constitution.md: Apache DevLake project constitution v1.0.0
  - Plugin Independence principle
  - Three-Layer Data Model (Raw/Tool/Domain)
  - Test-Driven Development requirements
  - Migration-First Schema Changes
  - Apache Compliance requirements
- templates/: spec, plan, tasks, checklist, agent-file templates
- scripts/powershell/: automation scripts for feature workflows
Add GitHub Copilot agent mode definitions:
- .github/agents/: Agent configurations (specify, plan, tasks, etc.)
- .github/prompts/: Prompt files linking to agents

These enable /speckit.* commands in VS Code Copilot for
Spec-Driven Development workflow.
Research for building a GitHub Copilot DevLake plugin:

- copilot_api_research.md: API endpoint documentation
- copilot_api_actual_responses.md: Live API test results (octodemo org)
- copilot_implementation_strategy.md: Option B (repo-level) approach
- copilot_plugin_spec.md: Full plugin specification
- copilot_research_summary.md: Research findings summary

Key decisions:
- Org/team-level metrics (not per-user) for privacy
- Time-based before/after correlation with DORA metrics
- Implementation date configuration for impact analysis
- Three-phase MVP approach

Ready for Spec-Driven Development implementation.
…tegy documents

- Created `copilot_api_actual_responses.md` to document actual API responses and key metrics.
- Developed `copilot_api_research.md` summarizing API endpoints, usage metrics, and authentication requirements.
- Established `copilot_implementation_strategy.md` outlining the strategy for repository/project-level analysis.
- Drafted `copilot_plugin_spec.md` detailing the plugin's specifications, data models, and API endpoints.
- Compiled `copilot_research_summary.md` to summarize findings and decisions made during the research phase.
Implements REST endpoints for Copilot connections and scopes, plus a Test Connection helper against the GitHub billing endpoint with friendly error handling.
Adds stateful collectors for /copilot/metrics and /copilot/billing/seats, plus extractors into tool tables with Retry-After handling and unit/e2e coverage.
Marks Phase 4 (US2) tasks as completed now that collectors/extractor, fixtures, and tests are in place.
Adds Copilot Adoption dashboard panels for active/engaged users, acceptance rate, chat usage, and seat timeline based on _tool_copilot_org_metrics.
Updates quickstart with the Copilot Adoption dashboard name/variables and marks US3 tasks complete.
…and enhance Dockerfile for script execution
Support both top-level arrays and wrapped {seats:[...]} responses; mark Copilot subtasks as CROSS domain type.
Eldrick Wega and others added 17 commits January 13, 2026 19:31
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
…askData

Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
…-gh-copilot

Rename GitHub Copilot plugin identifier and types from "copilot" to "gh-copilot"
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
@ewega ewega marked this pull request as ready for review January 16, 2026 14:57
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. add-a-plugin This issue is to add a plugin component/plugins This issue or PR relates to plugins pr-type/feature-development This PR is to develop a new feature labels Jan 16, 2026
@klesh
Copy link
Contributor

klesh commented Jan 19, 2026

Great job! Did you test it locally?

@ewega
Copy link
Contributor Author

ewega commented Jan 21, 2026

@klesh, yes tested locally, it seems there's some pipeline failing though so I'm going to try and fix those. Any comments from yourself?

@ewega
Copy link
Contributor Author

ewega commented Jan 31, 2026

Unfortunately, it seems like the metrics endpoint utilized is getting sunset: https://docs.github.com/en/enterprise-cloud@latest/rest/copilot/copilot-usage-metrics?apiVersion=2022-11-28

Poor timing. Will rework and open a new PR

@klesh
Copy link
Contributor

klesh commented Feb 3, 2026

I see. Take your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-a-plugin This issue is to add a plugin component/plugins This issue or PR relates to plugins pr-type/feature-development This PR is to develop a new feature size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants