Skip to content

Commit 095d720

Browse files
authored
Merge pull request #45549 from github/repo-sync
Repo sync
2 parents a34bf58 + 2d8aab5 commit 095d720

9 files changed

Lines changed: 260 additions & 11 deletions

File tree

‎content/copilot/how-tos/copilot-on-github/set-up-copilot/enable-copilot/set-up-for-teachers-and-os-maintainers.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ There are two ways to qualify for free access to {% data variables.copilot.copil
2626

2727
{% data variables.product.company_short %} reevaluates your eligibility every month.
2828

29+
{% data reusables.copilot.free-access-cancellation-note %} For more information about managing your plan, see [AUTOTITLE](/copilot/how-tos/manage-your-account/view-and-change-your-copilot-plan).
30+
2931
## What if I don't qualify for free access to {% data variables.copilot.copilot_pro_short %}?
3032

3133
If you do not meet the previous criteria, you can do one of the following:

‎content/copilot/how-tos/manage-your-account/view-and-change-your-copilot-plan.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ You can upgrade or downgrade your {% data variables.product.prodname_copilot_sho
6565

6666
You can cancel your {% data variables.product.prodname_copilot_short %} plan at any time. You’ll retain access to your current features until your billing cycle ends. You will automatically be downgraded to {% data variables.copilot.copilot_free_short %} at the end of your billing cycle.
6767

68-
If you have been granted free access to {% data variables.product.prodname_copilot_short %} as a verified student, teacher, or maintainer of a popular open source project, you won’t be able to cancel your plan. If you have access to {% data variables.product.prodname_copilot_short %} through an organization or enterprise, you will not be able to cancel your plan. In these cases, you can disable {% data variables.product.prodname_copilot_short %} in your environment. See [AUTOTITLE](/copilot/how-tos/configure-personal-settings/configure-in-ide).
68+
{% data reusables.copilot.free-access-cancellation-note %} If you have access to {% data variables.product.prodname_copilot_short %} through an organization or enterprise, you will not be able to cancel your plan. In these cases, you can disable {% data variables.product.prodname_copilot_short %} in your environment. See [AUTOTITLE](/copilot/how-tos/configure-personal-settings/configure-in-ide).
6969

7070
{% data reusables.copilot.copilot-one-account-short %}
7171

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Active-user counts:
158158
| `weekly_passive_copilot_code_review_users` | `integer` | No | Number of unique users who had {% data variables.copilot.copilot_code-review_short %} automatically assigned to review their pull request during a trailing seven-day window, with no active engagement. |
159159
| `monthly_passive_copilot_code_review_users` | `integer` | No | Number of unique users who had {% data variables.copilot.copilot_code-review_short %} automatically assigned to review their pull request during a trailing 28-day window, with no active engagement. |
160160
| `daily_active_cli_users` | `integer` | Yes | Number of unique users who used {% data variables.copilot.copilot_cli_short %} on a given day. This count is **independent** of IDE active-user counts and is **not** included in IDE-based active-user definitions. Omitted for enterprises or organizations with no CLI usage that day. |
161-
| `daily_active_copilot_app_users` | `integer` | Yes | Number of unique users who used the {% data variables.copilot.github_copilot_app_short %} on a given day. Enterprise reports only. Null when the enterprise has no {% data variables.copilot.github_copilot_app_short %} activity that day. |
161+
| `daily_active_copilot_app_users` | `integer` | Yes | Number of unique users who used the {% data variables.copilot.github_copilot_app_short %} on a given day. Null when the enterprise or organization has no {% data variables.copilot.github_copilot_app_short %} activity that day. |
162162

163163
Activity totals and breakdowns:
164164

@@ -177,7 +177,7 @@ Activity totals and breakdowns:
177177
| `totals_by_language_model` | `array` | No | Aggregated language-and-model activity breakdown. See [Activity breakdown objects](#activity-breakdown-objects). |
178178
| `totals_by_model_feature` | `array` | No | Aggregated model-and-feature activity breakdown. See [Activity breakdown objects](#activity-breakdown-objects). |
179179
| `totals_by_cli` | `object` | Yes | Aggregated {% data variables.copilot.copilot_cli_short %} metrics for the day. Omitted when there is no CLI usage that day. Unlike the per-user form, it does not include `last_known_cli_version`. See [{% data variables.copilot.copilot_cli_short %} metrics fields](#copilot-cli-metrics-fields). |
180-
| `totals_by_copilot_app` | `object` | Yes | Aggregated {% data variables.copilot.github_copilot_app_short %} metrics for the day. Enterprise reports only. Null when the enterprise has no {% data variables.copilot.github_copilot_app_short %} activity that day. See [{% data variables.copilot.github_copilot_app_short %} metrics fields](#copilot-app-metrics-fields). |
180+
| `totals_by_copilot_app` | `object` | Yes | Aggregated {% data variables.copilot.github_copilot_app_short %} metrics for the day. Null when the enterprise or organization has no {% data variables.copilot.github_copilot_app_short %} activity that day. See [{% data variables.copilot.github_copilot_app_short %} metrics fields](#copilot-app-metrics-fields). |
181181
| `totals_by_3rd_party_agent` | `array` | Yes | Aggregated per-agent usage metrics for recognized {% data variables.copilot.agent_apps %}. Omitted when the enterprise or organization had no recognized {% data variables.copilot.agent_app %} activity that day. See [{% data variables.copilot.agent_apps_caps %} metrics fields](#agent-apps-metrics-fields). |
182182
| `totals_by_ai_adoption_phase` | `array` | Yes | Per-phase aggregates of users and their average activity. Omitted when no adoption-phase data is available. See [AI adoption phase fields](#ai-adoption-phase-fields). |
183183
| `pull_requests` | `object` | No | Daily pull request activity for the enterprise or organization. See [Pull request activity fields](#pull-request-activity-fields). |
@@ -366,6 +366,8 @@ Each entry in the aggregated `totals_by_ai_adoption_phase` array contains:
366366
| `avg_pull_requests_merged` | `number` | No | Average pull requests merged per user in this phase. |
367367
| `total_pull_requests_merged` | `integer` | No | Total pull requests merged by users in this phase. Applies to the organization day and enterprise day aggregated reports. |
368368
| `avg_pull_requests_median_minutes_to_merge` | `number` | No | Average of the per-user median minutes to merge for users in this phase. |
369+
| `avg_pull_requests_minutes_to_review` | `number` | No | Median time in minutes from pull request creation to first review, scoped to merged pull requests and attributed to the pull request's merge day. |
370+
| `avg_pull_requests_review_cycles` | `number` | No | Median number of review submissions (review cycles) per pull request, scoped to merged pull requests and attributed to the pull request's merge day. |
369371

370372
### Breakdown dimension values
371373

‎content/copilot/reference/copilot-usage-metrics/example-schema.md‎

Lines changed: 97 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ The following are example schemas for the user-level, enterprise-level, and repo
1919

2020
```json copy
2121
[{
22+
"ai_adoption_phase": {
23+
"phase": "Phase 2",
24+
"phase_number": 2,
25+
"version": "v1"
26+
},
2227
"ai_credits_used": 12.5,
2328
"code_acceptance_activity_count": 3,
2429
"code_generation_activity_count": 3,
@@ -124,6 +129,10 @@ The following are example schemas for the user-level, enterprise-level, and repo
124129
"used_chat": false,
125130
"used_cli": true,
126131
"used_copilot_app": true,
132+
"used_copilot_cloud_agent": false,
133+
"used_copilot_code_review_active": null,
134+
"used_copilot_code_review_passive": null,
135+
"used_copilot_coding_agent": false,
127136
"user_id": 1,
128137
"user_login": "login1",
129138
"user_initiated_interaction_count": 1,
@@ -135,6 +144,8 @@ The following are example schemas for the user-level, enterprise-level, and repo
135144

136145
Organization per-user reports use the same `totals_by_3rd_party_agent` entry fields and also include `organization_id`. Per-user entries do not include `session_count`.
137146

147+
In this example, `used_copilot_code_review_active` and `used_copilot_code_review_passive` are `null` because there was no {% data variables.copilot.copilot_code-review_short %} signal for the user that day. `used_copilot_cloud_agent` and `used_copilot_coding_agent` always carry the same value.
148+
138149
## Enterprise-level schema example
139150

140151
```json copy
@@ -144,7 +155,10 @@ Organization per-user reports use the same `totals_by_3rd_party_agent` entry fie
144155
"code_generation_activity_count" : 4,
145156
"daily_active_cli_users" : 2,
146157
"daily_active_copilot_app_users" : 1,
158+
"daily_active_copilot_cloud_agent_users" : 1,
159+
"daily_active_copilot_code_review_users" : 1,
147160
"daily_active_users" : 2,
161+
"daily_passive_copilot_code_review_users" : 0,
148162
"day" : "2025-10-01",
149163
"enterprise_id" : "1",
150164
"loc_added_sum" : 54,
@@ -153,7 +167,10 @@ Organization per-user reports use the same `totals_by_3rd_party_agent` entry fie
153167
"loc_suggested_to_delete_sum" : 6,
154168
"monthly_active_agent_users" : 0,
155169
"monthly_active_chat_users" : 0,
170+
"monthly_active_copilot_cloud_agent_users" : 1,
171+
"monthly_active_copilot_code_review_users" : 1,
156172
"monthly_active_users" : 2,
173+
"monthly_passive_copilot_code_review_users" : 0,
157174
"pull_requests" : {
158175
"median_minutes_to_merge" : 2.5,
159176
"median_minutes_to_merge_copilot_authored" : 2.5,
@@ -181,6 +198,39 @@ Organization per-user reports use the same `totals_by_3rd_party_agent` entry fie
181198
"session_count" : 2,
182199
"user_initiated_interaction_count" : 2
183200
} ],
201+
"totals_by_ai_adoption_phase" : [ {
202+
"avg_code_acceptance_activities" : 1.0,
203+
"avg_code_generation_activities" : 1.0,
204+
"avg_loc_added" : 22.0,
205+
"avg_loc_deleted" : 0.0,
206+
"avg_pull_requests_created" : 1.0,
207+
"avg_pull_requests_median_minutes_to_merge" : 2.5,
208+
"avg_pull_requests_merged" : 1.0,
209+
"avg_pull_requests_minutes_to_review" : 1.5,
210+
"avg_pull_requests_review_cycles" : 1.0,
211+
"avg_pull_requests_reviewed" : 0.0,
212+
"avg_user_initiated_interactions" : 0.0,
213+
"phase" : "Phase 1",
214+
"phase_number" : 1,
215+
"total_engaged_users" : 1,
216+
"total_pull_requests_merged" : 1
217+
}, {
218+
"avg_code_acceptance_activities" : 3.0,
219+
"avg_code_generation_activities" : 3.0,
220+
"avg_loc_added" : 32.0,
221+
"avg_loc_deleted" : 6.0,
222+
"avg_pull_requests_created" : 1.0,
223+
"avg_pull_requests_median_minutes_to_merge" : 2.5,
224+
"avg_pull_requests_merged" : 1.0,
225+
"avg_pull_requests_minutes_to_review" : 2.0,
226+
"avg_pull_requests_review_cycles" : 2.0,
227+
"avg_pull_requests_reviewed" : 1.0,
228+
"avg_user_initiated_interactions" : 1.0,
229+
"phase" : "Phase 2",
230+
"phase_number" : 2,
231+
"total_engaged_users" : 1,
232+
"total_pull_requests_merged" : 1
233+
} ],
184234
"totals_by_cli" : {
185235
"prompt_count" : 3,
186236
"request_count" : 3,
@@ -252,7 +302,10 @@ Organization per-user reports use the same `totals_by_3rd_party_agent` entry fie
252302
"totals_by_language_model" : [ ],
253303
"totals_by_model_feature" : [ ],
254304
"user_initiated_interaction_count" : 1,
255-
"weekly_active_users" : 2
305+
"weekly_active_copilot_cloud_agent_users" : 1,
306+
"weekly_active_copilot_code_review_users" : 1,
307+
"weekly_active_users" : 2,
308+
"weekly_passive_copilot_code_review_users" : 0
256309
} ],
257310
"enterprise_id" : "1",
258311
"report_end_day" : "2025-10-01",
@@ -264,7 +317,10 @@ Organization per-user reports use the same `totals_by_3rd_party_agent` entry fie
264317
"day_totals" : [ {
265318
"code_acceptance_activity_count" : 2,
266319
"code_generation_activity_count" : 3,
320+
"daily_active_copilot_cloud_agent_users" : 0,
321+
"daily_active_copilot_code_review_users" : 0,
267322
"daily_active_users" : 2,
323+
"daily_passive_copilot_code_review_users" : 0,
268324
"day" : "2025-10-01",
269325
"enterprise_id" : "2",
270326
"loc_added_sum" : 50,
@@ -273,7 +329,10 @@ Organization per-user reports use the same `totals_by_3rd_party_agent` entry fie
273329
"loc_suggested_to_delete_sum" : 3,
274330
"monthly_active_agent_users" : 0,
275331
"monthly_active_chat_users" : 0,
332+
"monthly_active_copilot_cloud_agent_users" : 0,
333+
"monthly_active_copilot_code_review_users" : 0,
276334
"monthly_active_users" : 2,
335+
"monthly_passive_copilot_code_review_users" : 0,
277336
"pull_requests" : {
278337
"total_applied_suggestions" : 0,
279338
"total_copilot_applied_suggestions" : 0,
@@ -287,6 +346,39 @@ Organization per-user reports use the same `totals_by_3rd_party_agent` entry fie
287346
"total_reviewed_by_copilot" : 0,
288347
"total_suggestions" : 1
289348
},
349+
"totals_by_ai_adoption_phase" : [ {
350+
"avg_code_acceptance_activities" : 0.0,
351+
"avg_code_generation_activities" : 1.0,
352+
"avg_loc_added" : 12.0,
353+
"avg_loc_deleted" : 3.0,
354+
"avg_pull_requests_created" : 0.0,
355+
"avg_pull_requests_median_minutes_to_merge" : 0.0,
356+
"avg_pull_requests_merged" : 0.0,
357+
"avg_pull_requests_minutes_to_review" : 0.0,
358+
"avg_pull_requests_review_cycles" : 0.0,
359+
"avg_pull_requests_reviewed" : 0.0,
360+
"avg_user_initiated_interactions" : 0.0,
361+
"phase" : "No Cohort",
362+
"phase_number" : 0,
363+
"total_engaged_users" : 1,
364+
"total_pull_requests_merged" : 0
365+
}, {
366+
"avg_code_acceptance_activities" : 2.0,
367+
"avg_code_generation_activities" : 2.0,
368+
"avg_loc_added" : 38.0,
369+
"avg_loc_deleted" : 0.0,
370+
"avg_pull_requests_created" : 1.0,
371+
"avg_pull_requests_median_minutes_to_merge" : 0.0,
372+
"avg_pull_requests_merged" : 0.0,
373+
"avg_pull_requests_minutes_to_review" : 0.0,
374+
"avg_pull_requests_review_cycles" : 0.0,
375+
"avg_pull_requests_reviewed" : 1.0,
376+
"avg_user_initiated_interactions" : 1.0,
377+
"phase" : "Phase 1",
378+
"phase_number" : 1,
379+
"total_engaged_users" : 1,
380+
"total_pull_requests_merged" : 0
381+
} ],
290382
"totals_by_feature" : [ {
291383
"code_acceptance_activity_count" : 1,
292384
"code_generation_activity_count" : 2,
@@ -338,7 +430,10 @@ Organization per-user reports use the same `totals_by_3rd_party_agent` entry fie
338430
"totals_by_language_model" : [ ],
339431
"totals_by_model_feature" : [ ],
340432
"user_initiated_interaction_count" : 1,
341-
"weekly_active_users" : 2
433+
"weekly_active_copilot_cloud_agent_users" : 0,
434+
"weekly_active_copilot_code_review_users" : 0,
435+
"weekly_active_users" : 2,
436+
"weekly_passive_copilot_code_review_users" : 0
342437
} ],
343438
"enterprise_id" : "2",
344439
"report_end_day" : "2025-10-01",

‎content/migrations/elm/migrated-data-reference.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ The only organization-level action supported by {% data variables.product.prodna
2727
| Repository PR settings | Pull request merge and review settings |
2828
| Actions settings | Repository-level GitHub Actions configuration, including allowed actions and permissions |
2929
| Autolinks | Custom autolink references |
30-
| Branch protections | Branch protection rules |
30+
| Branch protections | Branch protection rules are partially migrated, with the limitations described below |
3131
| Pages | GitHub Pages configuration |
3232

33+
> [!WARNING]
34+
> Branch protection migration is partially supported. {% data variables.product.prodname_elm_short %} preserves whether actor restrictions are enabled for dismissing pull request reviews and pushing to protected branches, but it does not preserve the permitted users, teams, or apps. A push restriction can therefore be recreated on the destination with an empty allowlist. It also does not migrate pull request bypass actors, force-push actors, status check app bindings, matching-branch creation restrictions, merge queue settings, deployment requirements, or branch locking. Review and update migrated branch protection rules before allowing users to work in the destination repository.
35+
3336
### Git data, LFS, and wikis
3437

3538
| Resource | Notes |
@@ -96,7 +99,7 @@ The only organization-level action supported by {% data variables.product.prodna
9699
| Data | Notes |
97100
|---|---|
98101
| Repository defaults | N/A |
99-
| Repository rulesets | Only branch protection rules are migrated. |
102+
| Repository rulesets | Repository rulesets are not migrated. Branch protection rules are partially migrated. |
100103
| Pull requests from forks | N/A |
101104
| Pending pull request reviews | Only submitted reviews are migrated. |
102105

@@ -127,7 +130,7 @@ The following tables document which resource types support live updates and whic
127130
| **Label** | `created` | `deleted`, `edited` |
128131
| **Release** | `created`, `edited`, `prereleased`, `published`, `released`, `unpublished` | `deleted` |
129132
| **Milestone** | `closed`, `created`, `edited`, `opened` | `deleted` |
130-
| **Branch protection rule** | `created`, `edited` | `deleted` |
133+
| **Branch protection rule (partial support)** | `created`, `edited` | `deleted` |
131134
| **Commit comment** | `created`, `edited` | `deleted` |
132135
| **Page build** | All actions | N/A |
133136
| **Commit status checks** | All actions | N/A |
@@ -138,6 +141,7 @@ The following tables document which resource types support live updates and whic
138141
| **Repository actions settings** | `updated` | N/A |
139142
| **Repository webhook** | `created`, `updated` | N/A |
140143

144+
The branch protection limitations described in [Repository settings and configuration](#repository-settings-and-configuration) apply to both the initial migration and live updates.
141145

142146
> [!NOTE]
143147
> When a pull request review is submitted, {% data variables.product.prodname_elm_short %} imports the full review including all inline comments together. Inline comments that are part of an initial review submission are migrated correctly. However, **replies added to a review thread after the review has been submitted** are not captured as live updates and will not appear in the migrated repository.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If you have been granted free access to {% data variables.product.prodname_copilot_short %} as a verified student, teacher, or maintainer of a popular open source project, you won’t be able to cancel your plan.

‎src/links/lib/update-internal-links.ts‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,3 +701,26 @@ function singleStartingQuote(text: string) {
701701
function isSimpleQuote(text: string) {
702702
return text.startsWith('"') && text.endsWith('"') && text.split('"').length === 3
703703
}
704+
/**
705+
* Write a Markdown page back out, preserving the original frontmatter text verbatim
706+
* whenever the frontmatter data itself didn't change.
707+
*
708+
* Round-tripping frontmatter through the YAML serializer reflows values that were
709+
* never touched: long `intro` strings become block scalars, `redirect_from` entries get
710+
* rewrapped, and quote styles change. That churn dwarfs the actual link fixes and makes
711+
* a bulk run unreviewable, which is why this only reserializes when it has to.
712+
*/
713+
export function serializeMarkdown(
714+
rawContent: string,
715+
content: string,
716+
newContent: string,
717+
newData: Record<string, unknown> | undefined,
718+
differentData: boolean,
719+
): string {
720+
// `content` is the tail of the file, so everything before it is the frontmatter
721+
// block exactly as the author wrote it, delimiters and all.
722+
if (!differentData && rawContent.endsWith(content)) {
723+
return rawContent.slice(0, rawContent.length - content.length) + newContent
724+
}
725+
return frontmatter.stringify(newContent, newData || {})
726+
}

‎src/links/scripts/update-internal-links.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ import { program } from 'commander'
1414
import chalk from 'chalk'
1515
import { dump } from 'js-yaml'
1616

17-
import { updateInternalLinks } from '@/links/lib/update-internal-links'
18-
import frontmatter from '@/frame/lib/read-frontmatter'
17+
import { updateInternalLinks, serializeMarkdown } from '@/links/lib/update-internal-links'
1918
import walkFiles from '@/workflows/walk-files'
2019

2120
program
@@ -158,7 +157,11 @@ async function main(files: string[], opts: Options) {
158157
} else {
159158
// Remember the `content` and `newContent` is the "meat" of the
160159
// Markdown page. To save it you need the frontmatter data too.
161-
fs.writeFileSync(file, frontmatter.stringify(newContent || '', newData || {}), 'utf-8')
160+
fs.writeFileSync(
161+
file,
162+
serializeMarkdown(rawContent, content, newContent, newData, differentData),
163+
'utf-8',
164+
)
162165
}
163166
}
164167
}

0 commit comments

Comments
 (0)