Is GitHub Copilot actually improving your code reviews? Let's measure it using GitHub's new API metrics.
AI-assisted code review is becoming increasingly common across development teams. GitHub Copilot can analyse pull requests, identify potential issues, recommend improvements, and provide feedback before code is merged.
However, while it’s relatively easy to measure how frequently Copilot is being used, determining whether those reviews are actually useful is a different challenge.
For example, an organisation might report that Copilot reviewed hundreds of pull requests in a month. That tells us the capability is being adopted, but it doesn’t necessarily tell us whether developers are acting on the recommendations or whether those recommendations are improving the quality of the code.
On 5 November 2026, GitHub introduced additional metrics through its Copilot usage metrics API to help address this gap.
The new reporting capabilities provide information about how developers respond to Copilot code review comments, including whether feedback was addressed and what types of issues were identified.
Let’s explore the available metrics and build a simple reporting solution using the GitHub REST API and Python.
Understanding the new metrics
The updated API introduces a copilot_code_review object within repository-level usage reports.
This object contains several fields that allow us to investigate how Copilot’s code review feedback is being used.
Metric | Description |
total_comments_evaluated | Number of Copilot review comments evaluated for action |
total_comments_addressed | Number of evaluated comments developers acted on |
review_comments_by_severity | Breakdown of comments by severity |
review_comments_by_comment_type | Breakdown by categories such as bugs or security |
review_comments_by_review_tier | Breakdown by the review’s configured tier |
review_comments_by_customization | Breakdown by custom instructions, skills, MCP, or no customisation |
total_merged_no_human_change_request_after_review | Merged PRs without a later human change request after Copilot’s first review |
One particularly useful metric is the addressed rate, calculated as:
Addressed Rate =
Total Comments Addressed
———————— × 100
Total Comments Evaluated
For example, if Copilot generated 20 evaluated review comments and developers acted on 15 of them, the addressed rate would be 75%.
However, GitHub’s definition of addressed includes several forms of action. Developers might apply a suggested change, modify the code manually, ask Copilot to make a correction, or reply that the issue will be addressed in a later pull request.
Therefore, an addressed comment doesn’t necessarily mean the underlying problem has been resolved.
This distinction is important when interpreting the results.
How reporting the API works
GitHub exposes these metrics through its Copilot usage metrics REST API.
For this example, we’ll use the organisation-level daily repository report:
GET /orgs/{org}/copilot/metrics/reports/repos-1-day
The request includes a day query parameter specifying the reporting date.
Unlike a conventional API that returns all the metrics directly in the response, this endpoint returns a set of temporary download links.
These links point to files containing the actual report data in newline-delimited JSON, or NDJSON, format.
The general process is:
- Authenticate with the GitHub REST API.
- Request the repository usage report for a specific date.
- Retrieve the returned download links.
- Download and parse the NDJSON records.
- Calculate the relevant metrics for each repository.
We’ll implement these steps using Python.
Step 1: Configure API access
Before calling the API, you’ll need an appropriate GitHub account or application identity with permission to view Copilot metrics.
GitHub supports authorised organisation owners and users with the relevant metrics permissions. For a fine-grained personal access token, the organisation permission required is Organization Copilot metrics: Read.
The organisation must also have the Copilot usage metrics policy enabled as required by GitHub’s documentation.
For this demonstration, create an appropriately scoped token and store it in an environment variable rather than placing it directly in the script.
For example, in PowerShell:
$env:GITHUB_TOKEN = ""
$env:GITHUB_ORG = ""
$env:REPORT_DAY = "2026-11-05"
The reporting date is an example. When running the script, select a date for which GitHub has completed processing the metrics.
Install the Python requests package:
pip install requests
Step 2: Request the repository metrics
Create a Python file named:
copilot_review_metrics.py
Add the following code:
import os
import json
import requests
TOKEN = os.environ["GITHUB_TOKEN"]
ORG = os.environ["GITHUB_ORG"]
DAY = os.environ["REPORT_DAY"]
API_URL = (
f"https://api.github.com/orgs/{ORG}"
"/copilot/metrics/reports/repos-1-day"
)
headers = {
"Accept": "application/vnd.github+json",
"Authorization": f"Bearer {TOKEN}",
"X-GitHub-Api-Version": "2026-03-10"
}
response = requests.get(
API_URL,
headers=headers,
params={"day": DAY},
timeout=30
)
response.raise_for_status()
report = response.json()
download_links = report.get("download_links", [])
print(f"Report date: {report.get('report_day')}")
print(f"Report files: {len(download_links)}")
The script authenticates with GitHub and requests the repository report for the selected date.
If the request succeeds, the response contains download links to the report files. A simplified example of the response structure is:
{
"download_links": [
"https://example.com/report-1.ndjson"
],
"report_day": "2026-11-05"
}
The actual download URLs are generated by GitHub and expire after a limited period.
These URLs should be treated as sensitive temporary access resources and shouldn’t be included in application logs or shared publicly.
Step 3: Download and process the report
Next, append the following code to the same Python file:
for link in download_links:
file_response = requests.get(
link,
timeout=30
)
file_response.raise_for_status()
for line in file_response.text.splitlines():
if not line.strip():
continue
record = json.loads(line)
repository = record.get("repo_name")
review = record.get(
"copilot_code_review", {}
)
evaluated = review.get(
"total_comments_evaluated", 0
)
addressed = review.get(
"total_comments_addressed", 0
)
if evaluated > 0:
addressed_rate = (
addressed / evaluated
) * 100
else:
addressed_rate = None
print(f"\nRepository: {repository}")
print(f"Evaluated comments: {evaluated}")
print(f"Addressed comments: {addressed}")
if addressed_rate is not None:
print(
f"Addressed rate: "
f"{addressed_rate:.1f}%"
)
else:
print("Addressed rate: N/A")
The script downloads each report file, reads its NDJSON records, and calculates the addressed rate for each repository.
It’s important that we check whether total_comments_evaluated is greater than zero before calculating the rate.
A repository without evaluated comments shouldn’t automatically be reported as having a 0% addressed rate, because that would incorrectly imply that developers ignored the feedback.
Instead, we report the value as unavailable.
The example uses a single reporting day. For a longer reporting period, you would request multiple daily reports and aggregate the underlying comment counts.
You shouldn’t average daily percentages directly, because days with very different numbers of evaluated comments would receive equal weighting.
Step 4: Analyse different types of review feedback
One of the more interesting capabilities is the ability to investigate which types of recommendations developers are responding to.
For example, Copilot might identify security concerns, potential bugs, performance issues, or code that doesn’t follow a repository’s custom instructions.
You can retrieve these breakdowns from the review_comments_by_severity and review_comments_by_comment_type arrays.
Add the following inside the record-processing loop:
severity_breakdown = review.get(
"review_comments_by_severity", []
)
for item in severity_breakdown:
severity = item.get("severity")
evaluated_count = item.get(
"total_comments_evaluated", 0
)
addressed_count = item.get(
"total_comments_addressed", 0
)
print(
f"{severity}: "
f"{addressed_count}/{evaluated_count}"
" comments addressed"
)
This gives us a more detailed view of how developers are responding to different categories of feedback.
For example, a team might investigate why high-severity findings are frequently addressed while performance recommendations are ignored.
However, this shouldn’t immediately be interpreted as developers failing to follow good practices. Some recommendations may be inaccurate, irrelevant, or intentionally deferred.
The data provides a starting point for investigation, not a complete assessment of engineering quality.
Step 5: Building a reporting dashboard
Once the data is being retrieved successfully, the next step would be storing it somewhere suitable for reporting.
For a Microsoft-focused development team, I’d consider storing the aggregated data in Dataverse or another reporting data store and visualising it through Power BI.
A useful dashboard could include the total number of Copilot-reviewed pull requests, evaluated and addressed comments, addressed rate by repository, and breakdowns by severity or comment type.
You could also compare the addressed rate against other engineering indicators, such as test failures, defect reports, pull request cycle time, or the frequency of post-merge fixes.
For repositories using custom Copilot instructions or skills, the review_comments_by_customization field introduces another interesting possibility.
It allows developers to explore whether customisation influences the type of feedback generated and how frequently developers act on it.
However, an observed relationship doesn’t establish causation. Differences between repositories, team practices, review settings, and code complexity can all influence these metrics.
Understanding the limitations
There are several important limitations developers should understand before using these metrics.
First, comments are evaluated when the associated pull request is merged, meaning the reported activity belongs to the merge date rather than necessarily the date the comment was generated.
Second, comments on pull requests created by bots may not be evaluated in the same way as those on human-authored pull requests.
Third, the API does not provide an objective measure of whether Copilot’s recommendation was correct.
A developer can act on a suggestion that doesn’t improve code quality, just as they might reject a suggestion that was technically valid.
Similarly, a pull request merging without a later human change request doesn’t prove that it was free of defects.
For these reasons, I would avoid using addressed rates as a performance measure for individual developers.
These metrics are more useful for understanding how teams interact with AI-generated feedback and identifying opportunities to improve review processes.
Final thoughts
GitHub’s new code review metrics represent an improvement in how organisations can evaluate their use of AI-assisted development tools.
Rather than focusing exclusively on adoption, the data provides more visibility into what happens after Copilot produces a recommendation.
For development teams, that creates opportunities to investigate which types of feedback are most useful, whether custom instructions are improving review relevance, and where additional engineering practices might be needed.
However, metrics need to be interpreted carefully.
The objective shouldn’t be to maximise the number of Copilot comments or achieve the highest possible addressed rate.
It should be to improve the quality, reliability, and maintainability of the software being delivered.
AI-generated code reviews are useful, but the value comes from the quality of the feedback and the engineering decisions made in response to it.


