-
Notifications
You must be signed in to change notification settings - Fork 289
Add multi-organization scope support with metrics aggregation and user deduplication + Champions page #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…avoid double-counting
…dpoint Update AgentModeViewer labels, tooltips and table headers from "Total Users with Activity" to "Average Daily Users with Activity" and clarify tooltip text. Calculate daily averages in server/api/github-stats.ts for overall user totals and per-model totals (divide summed counts by number of days) so UI and API consistently report average daily engaged users.
- Add new ChampionsViewer.vue providing a Top 5 Teams card and an All Teams leaderboard with search, sorting, team detail links and visual rank badges. - Load teams and per-team metrics, compute average acceptance rate and weekday avg active users, and support multi-organization display names. - Integrate component into MainComponent: import ChampionsViewer, add 'champions' tab and render the viewer in the v-window.
…umulative totals for acceptance rate - Add Total Suggestions and Total Acceptances columns to ChampionsViewer table (with icons and locale-formatted counts) - Include totalSuggestions/totalAcceptances in TeamWithMetrics and populate when loading team metrics - Change acceptance rate calculation in ChampionsViewer to use cumulative totals (total_acceptances / total_suggestions) and return totals from loadMetricsForTeam - Update TeamsComponent average acceptance rate computation to use cumulative totals per team (consistent with MetricsViewer)
|
would it be possible just to re-use getting metrics on enterprise level doesn't already provide org aggregated metrics? |
…ted) - Update README to document NUXT_PUBLIC_GITHUB_ORG as single or comma-separated list and remove references to NUXT_PUBLIC_GITHUB_ORGS - Parse comma-separated githubOrg in Options runtime config to populate githubOrgs and enable multi-organization scope - Remove githubOrgs runtime config entry from nuxt.config.ts (use githubOrg for both single and multi-org) - Update getDisplayName to derive org list from githubOrg for multi-organization scope
|
Hi @karpikpl , i've consolidated and updated the NUXT_PUBLIC_GITHUB_ORG to support multi-orgs when field has comma separated list. |
|
It might not be part of this PR, but it would be very useful if the list of organizations could also be retrieved dynamically within GitHub Enterprise, for example via const installations = await octokit.paginate(octokit.rest.apps.listInstallations); |
This PR introduces support for aggregating GitHub Copilot metrics across multiple organizations, enabling unified visibility and analysis of Copilot usage for teams working across organizational boundaries.
🆕 New Features
Multi-Organization Scope: Added new multi-organization scope type to fetch and aggregate metrics from multiple GitHub organizations simultaneously
Environment Configuration: Introduced NUXT_PUBLIC_GITHUB_ORGS environment variable for comma-separated organization list configuration
Parallel Data Fetching: Implemented concurrent API calls to multiple organizations with intelligent caching per organization
📊 Data Aggregation & Deduplication
Metrics Aggregation: Created aggregateMetricsByDate() function to merge metrics across organizations by date
Smart User Counting: Uses MAX aggregation for total_active_users instead of SUM to prevent double-counting users who are active in multiple organizations
Seats Deduplication: Implemented deduplicateSeats() to merge seat assignments across organizations, keeping the most recent activity per user
Teams Organization Tracking: Extended team data to track which organization each team belongs to, enabling proper team comparisons across orgs
Example configuration:

Technical Highlights
Maintains backward compatibility with existing single-organization scope
Preserves per-organization caching for optimal performance
Conservative user counting approach (MAX vs SUM) ensures accurate metrics without inflation
Fully type-safe TypeScript implementation with updated serialization methods