Skip to content

Commit 2a0e939

Browse files
sophiethekingCopilotsabrowning1
authored
Introduce CCA PR merge count, cycle time, and acceptance rate (Enterprise-level API only) (#59671)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com>
1 parent cd6a7fe commit 2a0e939

File tree

4 files changed

+30
-7
lines changed

4 files changed

+30
-7
lines changed

content/copilot/concepts/agents/code-review.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ category:
1919

2020
## Introduction
2121

22-
{% data variables.copilot.copilot_code-review_short %} reviews code written in any language, and provides feedback. It reviews your code from multiple angles to identify issues and suggest fixes. You can apply suggested changes with a couple of clicks.
22+
{% data variables.copilot.copilot_code-review_short %} reviews code written in any language, and provides feedback. It reviews your code from multiple angles to identify issues and suggest fixes. You can apply suggested changes with a couple of clicks.
2323

2424
This article provides an overview of {% data variables.copilot.copilot_code-review_short %}. To learn how to request a code review from {% data variables.product.prodname_copilot_short %}, see [AUTOTITLE](/copilot/how-tos/agents/copilot-code-review/using-copilot-code-review).
2525

@@ -78,7 +78,7 @@ Some file types are excluded from {% data variables.copilot.copilot_code-review_
7878
* Log files
7979
* SVG files
8080

81-
If you include these file types in a pull request, {% data variables.copilot.copilot_code-review_short %} will not review the file.
81+
If you include these file types in a pull request, {% data variables.copilot.copilot_code-review_short %} will not review the file.
8282

8383
For more information, see [AUTOTITLE](/copilot/reference/review-excluded-files).
8484

content/copilot/concepts/agents/coding-agent/about-coding-agent.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ Having {% data variables.copilot.copilot_coding_agent %} as an additional coding
6767

6868
You can create specialized {% data variables.copilot.custom_agents_short %} for different tasks. For example, you might create a {% data variables.copilot.copilot_custom_agent_short %} specialized for frontend development that focuses on React components and styling, a documentation agent that excels at writing and updating technical documentation, or a testing agent that specializes in generating comprehensive unit tests. Each {% data variables.copilot.copilot_custom_agent_short %} can be tailored with specific prompts and tools suited to its particular task.
6969

70+
## Measuring pull request outcomes for {% data variables.copilot.copilot_coding_agent %}
71+
72+
Enterprise administrators can use {% data variables.product.prodname_copilot_short %} usage metrics to analyze pull request outcomes for pull requests created by {% data variables.copilot.copilot_coding_agent %}.
73+
74+
The enterprise-level {% data variables.product.prodname_copilot_short %} usage metrics API includes pull request lifecycle metrics such as:
75+
76+
* The total number of pull requests created and merged
77+
* The number of pull requests created by {% data variables.copilot.copilot_coding_agent %} that have been merged
78+
* Median time to merge for merged pull requests, including pull requests created by {% data variables.copilot.copilot_coding_agent %}
79+
80+
These metrics can help you track adoption of {% data variables.copilot.copilot_coding_agent %} and monitor changes in pull request throughput and time to merge over time. See [AUTOTITLE](/copilot/concepts/copilot-usage-metrics/copilot-metrics).
81+
7082
## Integrating {% data variables.copilot.copilot_coding_agent %} with third-party tools
7183

7284
You can also invoke {% data variables.copilot.copilot_coding_agent %} from external tools, allowing you to assign tasks to {% data variables.product.prodname_copilot_short %}, provide context, and open pull requests without leaving your workflow. See [AUTOTITLE](/copilot/concepts/tools/about-copilot-integrations)

content/copilot/concepts/copilot-usage-metrics/copilot-metrics.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: GitHub Copilot usage metrics
33
shortTitle: Copilot usage metrics
4-
intro: '{% data variables.product.prodname_copilot %} usage metrics provide visibility into how {% data variables.product.prodname_copilot %} is adopted and used across your organization, including engagement, activity, and code generation trends.'
4+
intro: '{% data variables.product.prodname_copilot_short %} usage metrics provide visibility into how {% data variables.product.prodname_copilot_short %} is adopted and used across your organization, including engagement, activity, code generation, and pull request lifecycle trends.'
55
versions:
66
feature: copilot
77
topics:
@@ -21,14 +21,14 @@ category:
2121
- Track Copilot usage
2222
- Learn about Copilot
2323
- Get started with metrics
24-
- Manage Copilot for a team
24+
- Manage Copilot for a team
2525
---
2626

2727
{% data reusables.copilot.usage-metrics-preview %}
2828

2929
## About {% data variables.product.prodname_copilot_short %} usage metrics
3030

31-
{% data variables.product.prodname_copilot_short %} usage metrics help key stakeholders and decision-makers understand how their teams are adopting and using {% data variables.product.prodname_copilot_short %}. By tracking usage patterns across the enterprise, you can measure engagement, identify opportunities to increase value, and make data-driven decisions about enablement and rollout.
31+
{% data variables.product.prodname_copilot_short %} usage metrics help key stakeholders and decision-makers understand how their teams are adopting and using {% data variables.product.prodname_copilot_short %}. By tracking usage patterns across the enterprise, you can measure engagement, identify opportunities to increase value, and assess how AI-assisted workflows influence pull request throughput and time to merge.
3232

3333
Metrics are available through:
3434

@@ -116,7 +116,7 @@ For example, all usage data for a Monday (which closes at midnight UTC) will be
116116

117117
## What does the data measure?
118118

119-
{% data variables.product.prodname_copilot_short %} usage metrics can be grouped into four main categories: Adoption, Engagement, Acceptance Rate, and Lines of Code (LoC) metrics.
119+
{% data variables.product.prodname_copilot_short %} usage metrics can be grouped into a few main categories: Adoption, engagement, acceptance rate, Lines of Code (LoC), and pull request lifecycle metrics.
120120

121121
**Adoption** measures how many licensed developers are actively using {% data variables.product.prodname_copilot_short %} within your enterprise. For example, daily active users (DAU) tells you how many unique users interacted with {% data variables.product.prodname_copilot_short %} on a given day. Ideally, you'll see a consistent upward trend in these metrics during rollout.
122122

@@ -126,6 +126,8 @@ For example, all usage data for a Monday (which closes at midnight UTC) will be
126126

127127
**Lines of Code (LoC) metrics** measure the number of lines {% data variables.product.prodname_copilot_short %} suggested, added, or deleted in the editor, providing a directional view of {% data variables.product.prodname_copilot_short %}’s tangible output. For example, "Lines added" shows how much code was actually accepted and inserted into the editor.
128128

129+
**Pull request lifecycle metrics** measure how {% data variables.product.prodname_copilot_short %} activity relates to pull request outcomes and delivery flow. These metrics include pull request creation and merge counts, median time to merge, and review suggestion activity. By comparing overall pull request activity with pull requests created by {% data variables.product.prodname_copilot_short %}, you can evaluate how AI-assisted workflows influence throughput and cycle time across your enterprise.
130+
129131
## How can I use these metrics?
130132

131133
These metrics can be used together to answer key questions about your teams' usage of {% data variables.product.prodname_copilot_short %}.
@@ -136,6 +138,7 @@ These metrics can be used together to answer key questions about your teams' usa
136138
| Which features deliver the most value? | Requests per chat mode, agent adoption |
137139
| Do developers trust {% data variables.product.prodname_copilot_short %}’s output? | Acceptance rate trends |
138140
| Are enablement efforts working? | Growth in adoption and engagement after training or communication campaigns |
141+
| Is {% data variables.product.prodname_copilot_short %} influencing delivery speed or PR throughput? | Pull request merge counts and median time to merge |
139142

140143
Look for patterns across these signals rather than focusing on any single number. For example, a steady DAU paired with a rising acceptance rate indicates growing trust and value.
141144

content/copilot/reference/copilot-usage-metrics/copilot-usage-metrics.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,19 @@ These fields appear in the exported NDJSON reports and in the {% data variables.
9797

9898
### Pull request activity fields (API only)
9999

100-
These fields capture daily pull request creation and review activity across the enterprise, including activity performed by {% data variables.product.prodname_copilot_short %}.
100+
These fields capture daily pull request creation, review, merge, and suggestion activity across the enterprise, including activity performed by {% data variables.product.prodname_copilot_short %}.
101101

102102
| Field | Description |
103103
|:--|:--|
104104
| `pull_requests.total_created` | Total number of pull requests created across the enterprise on this specific day. <br/><br/>Creation is a one-time event. Each pull request is counted only on the day it is created. |
105105
| `pull_requests.total_reviewed` | Total number of pull requests reviewed across the enterprise on this specific day. <br/><br/>The same pull request may be counted on multiple days if it receives reviews on multiple days. Within a single day, each pull request is counted once, even if multiple review actions occur. |
106+
| `pull_requests.total_merged` | Total number of pull requests merged across the enterprise on this specific day. <br/><br/>Merging is a one-time event. Each pull request is counted only on the day it is merged. |
107+
| `pull_requests.median_minutes_to_merge` | Median time, in minutes, between pull request creation and merge for pull requests merged on this specific day. <br/><br/>Median is used to reduce the impact of outliers from unusually long-running pull requests. |
108+
| `pull_requests.total_suggestions` | Total number of pull request review suggestions generated on this specific day, regardless of author. |
109+
| `pull_requests.total_applied_suggestions` | Total number of pull request review suggestions that were applied on this specific day, regardless of author. |
106110
| `pull_requests.total_created_by_copilot` | Number of pull requests created by {% data variables.product.prodname_copilot_short %} across the enterprise on this specific day. |
107111
| `pull_requests.total_reviewed_by_copilot` | Number of pull requests reviewed by {% data variables.product.prodname_copilot_short %} across the enterprise on this specific day. <br/><br/>A pull request may be counted on multiple days if {% data variables.product.prodname_copilot_short %} reviews it on multiple days. |
112+
| `pull_requests.total_merged_created_by_copilot` | Number of pull requests created by {% data variables.product.prodname_copilot_short %} that were merged on this specific day. Each pull request is counted only on the day it is merged. |
113+
| `pull_requests.median_minutes_to_merge_copilot_authored` | Median time, in minutes, between pull request creation and merge for pull requests created by {% data variables.product.prodname_copilot_short %} and merged on this specific day. |
114+
| `pull_requests.total_copilot_suggestions` | Number of pull request review suggestions generated by {% data variables.product.prodname_copilot_short %} on this specific day. |
115+
| `pull_requests.total_copilot_applied_suggestions` | Number of pull request review suggestions generated by {% data variables.product.prodname_copilot_short %} that were applied on this specific day. |

0 commit comments

Comments
 (0)