仓库级 GitHub Copilot 使用情况指标现已全面可用
英文标题:Repository-level GitHub Copilot usage metrics generally available
Copilot 使用情况指标 REST API 新增仓库级活动报告能力。两个新端点按日返回每个仓库的拉取请求活动细分,分别统计 Copilot coding agent 和 Copilot code review 的数据。这意味着开发者可以精确查看 Copilot 在整个代码库中推动拉取请求活动的具体仓库,并为评估 AI 就绪度奠定基础。企业所有者和组织管理员可以据此识别受益最大的仓库,并针对性地推动功能启用与采用。
143.3 KB
中文
Copilot 使用情况指标 REST API 现在会报告仓库级别的活动。两个新端点以每日、按仓库的方式返回 Copilot coding agent 和 Copilot code review 的拉取请求活动细分。这些端点同时适用于企业报告和组织报告。
两个新端点返回指定某天的按仓库报告:
GET /enterprises/{enterprise}/copilot/metrics/reports/repos-1-day?day=YYYY-MM-DDGET /orgs/{org}/copilot/metrics/reports/repos-1-day?day=YYYY-MM-DD
每个响应会返回以下活动:
- 由 Copilot coding agent 创建并合并的拉取请求。
- 由 Copilot code review 审查的拉取请求,其中的建议数量会按评论类型细分。
此前,Copilot 使用情况指标最多只到组织与用户级别。仓库级报告让你可以准确了解 Copilot coding agent 和 Copilot code review 在整个代码库的哪些仓库中驱动了拉取请求活动。这是仓库洞察与 AI 就绪度报告的基础,因此你可以将支持与推动措施聚焦在获益最大的仓库上。
企业所有者与账单管理员、组织所有者,以及任何被授予 View Copilot Metrics 权限的自定义组织或企业角色人员都能访问这些报告。必须启用 Copilot 使用情况指标策略,才能支持此功能。
访问 Copilot 使用情况指标 API 文档 即可开始。
English / 原文
The Copilot usage metrics REST API now reports repository-level activity. Two new endpoints return a daily, per-repository breakdown of pull request activity for Copilot coding agent and Copilot code review. They do this for both enterprise and organization reports.
Two new endpoints return a per-repository report for a single day:
GET /enterprises/{enterprise}/copilot/metrics/reports/repos-1-day?day=YYYY-MM-DDGET /orgs/{org}/copilot/metrics/reports/repos-1-day?day=YYYY-MM-DD
Each response returns the following activity:
- Pull requests created and merged by Copilot coding agent.
- Pull requests reviewed by Copilot code review, with suggestion counts broken down by comment type.
Until now, Copilot usage metrics stopped at the organization and user level. Repository-level reporting lets you see exactly where Copilot coding agent and Copilot code review are driving pull request activity across your codebase. This is the foundation for repository insights and AI-readiness reporting, so you can target enablement at the repositories that stand to benefit most.
Enterprise owners and billing managers, organization owners, and anyone with a custom organization or enterprise role that grants the View Copilot Metrics permission can access these reports. The Copilot usage metrics policy must be enabled to support this functionality.
Visit the Copilot usage metrics API documentation to get started.