Skip to content

Add GitHub Copilot metrics dashboa autoCorrect AI dashboard#2

Merged
DewDropstempest merged 8 commits intomasterfrom
copilot/setup-copilot-metrics-for-dashboard
Apr 29, 2026
Merged

Add GitHub Copilot metrics dashboa autoCorrect AI dashboard#2
DewDropstempest merged 8 commits intomasterfrom
copilot/setup-copilot-metrics-for-dashboard

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 25, 2026

This update introduces a self-hosted Copilot usage dashboard. A scheduled GitHub Actions workflow retrieves organizational metrics from the GitHub API daily and commits the data, which is then visualized via a static HTML dashboard.

New Files:

  • .github/workflows/copilot-metrics.yml — Executes daily at 06:00 UTC via cron, with manual execution possible through workflow_dispatch. It calls the GET /orgs/DewDropstempest/copilot/usage endpoint, normalizes the response formats from both v1 and v2 APIs, writes the data to copilot-dashboard/data/metrics.json, and automatically commits changes if any data updates occur ([skip ci]).
  • copilot-dashboard/index.html — A dark-themed static dashboard utilizing Chart.js via CDN. It displays five key performance indicator cards and four line charts covering active users, suggestions versus acceptances, acceptance rate percentage, and lines suggested versus accepted. The dashboard gracefully handles cases with no data.
  • copilot-dashboard/data/metrics.json — An initial empty array seed file, populated automatically by the workflow.
  • copilot-dashboard/README.md — A setup guide detailing Personal Access Token (PAT) creation, repository secret configuration (COPILOT_METRICS_TOKEN), manual workflow trigger procedures, and optional deployment to GitHub Pages.

Manual Configuration Requirements:

An administrator of the repository or organization must add a secret before the workflow can be executed:

Secret Value
COPILOT_METRICS_TOKEN A fine-grained PAT with read-only access to GitHub Copilot Business for the organization, or a classic PAT with manage_billing: copilot permission.

The dashboard can be served via GitHub Pages by configuring the source directory to /copilot-dashboard on the relevant branch.

badappearance and others added 8 commits June 12, 2025 23:55
Update README text and example code
Signed-off-by: ko-zu <causeless@gmail.com>
Agent-Logs-Url: https://github.com/DewDropstempest/psl/sessions/2e03a6fc-9a19-48f1-b069-17d77020600f

Co-authored-by: DewDropstempest <123912597+DewDropstempest@users.noreply.github.com>
…he functionality of our application. By adding new scenarios and refactoring existing ones, we can ensure that the code remains robust and reliable. It is important to regularly review and enhance our test suite as the application evolves to catch potential bugs early in the development process.
Agent-Logs-Url: https://github.com/DewDropstempest/psl/sessions/544777bc-a666-4096-ba06-15835e5b4a1c

Co-authored-by: DewDropstempest <123912597+DewDropstempest@users.noreply.github.com>
@DewDropstempest DewDropstempest changed the base branch from devel to copilot/explore-codebase-and-plan-implementation April 25, 2026 20:45
@DewDropstempest DewDropstempest changed the base branch from copilot/explore-codebase-and-plan-implementation to autorelease April 25, 2026 20:46
Copy link
Copy Markdown
Owner

@DewDropstempest DewDropstempest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Repo copilot metrics status bar test developer admin

@DewDropstempest DewDropstempest marked this pull request as ready for review April 26, 2026 04:18
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9288a38f7f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

token = os.environ["COPILOT_METRICS_TOKEN"]
org = os.environ["ORG"]

url = f"https://api.github.com/orgs/{org}/copilot/usage"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use supported Copilot metrics API route

The workflow calls https://api.github.com/orgs/{org}/copilot/usage, but GitHub’s Copilot metrics endpoints changed and the legacy set was shut down on April 2, 2026; organization usage data is now retrieved through /orgs/{org}/copilot/metrics/reports/.... In this job, a non-200 response triggers SystemExit, so the scheduled run never writes new data and the dashboard remains stale/empty.

Useful? React with 👍 / 👎.

Comment on lines +77 to +80
entry["total_suggestions_count"] = cc.get("total_suggestions_count", 0)
entry["total_acceptances_count"] = cc.get("total_acceptances_count", 0)
entry["total_lines_suggested"] = cc.get("total_lines_suggested", 0)
entry["total_lines_accepted"] = cc.get("total_lines_accepted", 0)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Map v2 completion counters from correct fields

In the copilot_ide_code_completions branch, the code reads total_*_count keys directly from cc, but the v2 path described in the comments stores metrics under nested totals (or deeper structures), so these lookups fall back to 0. When v2 payloads are returned, suggestions/acceptances/line KPIs and charts will be silently underreported as zero.

Useful? React with 👍 / 👎.

@DewDropstempest DewDropstempest changed the base branch from autorelease to master April 26, 2026 04:57
@DewDropstempest DewDropstempest added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed question Further information is requested bug Something isn't working duplicate This issue or pull request already exists good first issue Good for newcomers invalid This doesn't seem right wontfix This will not be worked on labels Apr 26, 2026
@DewDropstempest
Copy link
Copy Markdown
Owner

This self-hosted Copilot usage dashboard automatically fetches org-level metrics from the GitHub API daily through a scheduled GitHub Actions workflow and commits the data. A static HTML dashboard visualizes this information.

New files

  • .github/workflows/copilot-metrics.yml — runs at 06:00 UTC via cron (and can be triggered manually with workflow_dispatch); calls GET /orgs/DewDropstempest/copilot/usage, normalizes both v1 and v2 API response formats, writes copilot-dashboard/data/metrics.json, and commits changes automatically if data updates ([skip ci]).
  • copilot-dashboard/index.html — a dark-theme static dashboard using Chart.js (via CDN); displays 5 KPI cards and 4 line charts (active users, suggestions vs. acceptances, acceptance rate %, lines suggested vs. accepted); handles empty data states gracefully.
  • copilot-dashboard/data/metrics.json — seed file (initially empty); populated automatically by the workflow.
  • copilot-dashboard/README.md — setup guide covering PAT creation, repository secret (COPILOT_METRICS_TOKEN), manual trigger options, and optional GitHub Pages deployment.

Manual setup requirements

A secret must be added by a repo or org admin before the workflow can operate:

Secret Value
COPILOT_METRICS_TOKEN A fine-grained PAT with GitHub Copilot Business → Read-only org permission or a Classic PAT with manage_billing:copilot scope

Deploy the dashboard on GitHub Pages by setting the source to /copilot-dashboard on this branch.

@DewDropstempest DewDropstempest changed the title Add GitHub Copilot metrics dashboard with automated daily data collection Add GitHub Copilot metrics dashboa autoCorrect AI dashboard Apr 27, 2026
@DewDropstempest DewDropstempest merged commit c29fdc9 into master Apr 29, 2026
8 checks passed
@DewDropstempest
Copy link
Copy Markdown
Owner

Check SSH status and prepare for push

ssh -T git@github.com
git add .
git commit -m "Update Omni-Bridge Admin via AI Studio mobile"
git push origin main
import os
import sys

def init_omni_bridge():
# Setup for mobile-responsive backend
project_name = "Omni-Bridge-Admin"
version = "1.0.0"
print(f"Initializing {project_name} v{version}...")
# Placeholder for GitHub integration and local storage
return True

if name == "main":
init_omni_bridge()

In: /.gemini/commands/changelog.toml

Invoked via: /changelog 1.2.0 added "Support for default argument parsing."

description = "Adds a new entry to the project's CHANGELOG.md file."
prompt = """

Task: Update Changelog

You are an expert maintainer of this software project. A user has invoked a command to add a new entry to the changelog.

The user's raw command is appended below your instructions.

Your task is to parse the <version>, <change_type>, and <message> from their input and use the write_file tool to correctly update the CHANGELOG.md file.

Expected Format

The command follows this format: /changelog <version> <type> <message>

  • <type> must be one of: "added", "changed", "fixed", "removed".

Behavior

  1. Read the CHANGELOG.md file.
  2. Find the section for the specified <version>.
  3. Add the <message> under the correct <type> heading.
  4. If the version or type section doesn't exist, create it.
  5. Adhere strictly to the "Keep a Changelog" format.
    """ how do i make all of this usabke and relavent to creating my ai keyboard

@DewDropstempest DewDropstempest deleted the copilot/setup-copilot-metrics-for-dashboard branch May 1, 2026 07:57
@DewDropstempest DewDropstempest self-requested a review May 1, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation duplicate This issue or pull request already exists enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed invalid This doesn't seem right question Further information is requested wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants