Skip to content

Commit 8c98f42

Browse files
authored
Merge pull request #40922 from github/repo-sync
Repo sync
2 parents 5ef49ed + 5ae4ec0 commit 8c98f42

File tree

25 files changed

+381
-245
lines changed

25 files changed

+381
-245
lines changed

content/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ journeyTracks:
288288
- Optional.
289289

290290
### `topics`
291-
- Purpose: Indicate the topics covered by the article. Refer to the content models for more details about adding topics. A full list of existing topics is located in the [allowed topics file](/data/allowed-topics.js). If topics in article frontmatter and the allow-topics list become out of sync, the [topics CI test](/src/search/tests/topics.js) will fail.
291+
- Purpose: Indicate the topics covered by the article. Refer to the content models for more details about adding topics. A full list of existing topics is located in the [allowed topics file](/data/allowed-topics.ts). If topics in article frontmatter and the allow-topics list become out of sync, the [topics CI test](/src/search/tests/topics.ts) will fail.
292292
- Type: Array of `String`s
293293
- Optional: Topics are preferred for each article, but, there may be cases where existing articles don't yet have topics, or adding a topic to a new article may not add value.
294294

content/contributing/style-guide-and-content-model/about-topics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ topics:
2020
---
2121
```
2222

23-
For more information on adding topics to an article see, [AUTOTITLE](/contributing/writing-for-github-docs/using-yaml-frontmatter#topics). For a list of all allowed topics, see [`allowed-topics`](https://github.com/github/docs/blob/main/data/allowed-topics.js).
23+
For more information on adding topics to an article see, [AUTOTITLE](/contributing/writing-for-github-docs/using-yaml-frontmatter#topics). For a list of all allowed topics, see [`allowed-topics`](https://github.com/github/docs/blob/main/data/allowed-topics.ts).
2424

2525
## Topics for all content types
2626

content/contributing/writing-for-github-docs/templates.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ intro: 'Article intro. See tips for a great intro below.'
7373
product: "{{ optional product callout }}"
7474
type: reference
7575
topics:
76-
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.js
76+
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.ts
7777
versions:
7878
- <version>
7979
---
@@ -125,7 +125,7 @@ intro: 'Article intro. See tips for a great intro below.'
125125
product: "{{ optional product callout }}"
126126
type: how_to
127127
topics:
128-
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.js
128+
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.ts
129129
versions:
130130
- <version>
131131
---
@@ -176,7 +176,7 @@ shortTitle: <subject> # Max 31 characters
176176
intro: 'Article intro. Highlight that the guide is quick and to the point.'
177177
type: quick_start
178178
topics:
179-
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.js
179+
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.ts
180180
versions:
181181
- <version>
182182
---
@@ -245,7 +245,7 @@ intro: 'Article intro. See tips for a great intro below'
245245
product: "{{ optional product callout }}"
246246
type: tutorial
247247
topics:
248-
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.js
248+
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.ts
249249
versions:
250250
- <version>
251251
---
@@ -320,7 +320,7 @@ intro: 'Article intro. See tips for a great intro below'
320320
product: "{{ optional product callout }}"
321321
type: tutorial
322322
topics:
323-
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.js
323+
- <topic> # One or more from list of allowed topics: https://github.com/github/docs/blob/main/data/allowed-topics.ts
324324
versions:
325325
- <version>
326326
---

content/contributing/writing-for-github-docs/using-yaml-frontmatter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ journeyTracks:
288288

289289
### `topics`
290290

291-
* Purpose: Indicate the topics covered by the article. Refer to the content models for more details about adding topics. A full list of existing topics is located in the [allowed topics file](https://github.com/github/docs/blob/main/data/allowed-topics.js). If topics in article frontmatter and the allow-topics list become out of sync, the [topics CI test](https://github.com/github/docs/blob/main/src/search/tests/topics.ts) will fail.
291+
* Purpose: Indicate the topics covered by the article. Refer to the content models for more details about adding topics. A full list of existing topics is located in the [allowed topics file](https://github.com/github/docs/blob/main/data/allowed-topics.ts). If topics in article frontmatter and the allow-topics list become out of sync, the [topics CI test](https://github.com/github/docs/blob/main/src/search/tests/topics.ts) will fail.
292292
* Type: Array of `String`s
293293
* Optional: Topics are preferred for each article, but, there may be cases where existing articles don't yet have topics, or adding a topic to a new article may not add value.
294294

content/copilot/index.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,21 @@ introLinks:
1313
featuredLinks:
1414
startHere:
1515
- /copilot/get-started/what-is-github-copilot
16-
- /copilot/get-started/quickstart
17-
- /copilot/tutorials/try-extensions
18-
- /copilot/concepts/agents/coding-agent
16+
- '{% ifversion fpt %}/copilot/get-started/quickstart{% endif %}'
17+
- '{% ifversion fpt %}/copilot/tutorials/try-extensions{% endif %}'
18+
- '{% ifversion fpt %}/copilot/concepts/agents/coding-agent{% endif %}'
19+
- '{% ifversion ghec %}/copilot/get-started/choose-enterprise-plan{% endif %}'
20+
- '{% ifversion ghec %}/copilot/how-tos/set-up/set-up-for-enterprise{% endif %}'
21+
- '{% ifversion ghec %}/copilot/tutorials/coding-agent/pilot-coding-agent{% endif %}'
1922
popular:
2023
- /copilot/get-started/features
21-
- /copilot/tutorials/copilot-chat-cookbook
22-
- /copilot/how-tos/get-code-suggestions/get-ide-code-suggestions
23-
- /copilot/how-tos/chat-with-copilot/chat-in-ide
24-
- /copilot/how-tos/use-copilot-for-common-tasks/use-copilot-in-the-cli
24+
- '{% ifversion fpt %}/copilot/tutorials/copilot-chat-cookbook{% endif %}'
25+
- '{% ifversion fpt %}/copilot/how-tos/get-code-suggestions/get-ide-code-suggestions{% endif %}'
26+
- '{% ifversion fpt %}/copilot/how-tos/chat-with-copilot/chat-in-ide{% endif %}'
27+
- '{% ifversion fpt %}/copilot/how-tos/use-copilot-for-common-tasks/use-copilot-in-the-cli{% endif %}'
28+
- '{% ifversion ghec %}/copilot/how-tos/manage-and-track-spending/manage-request-allowances{% endif %}'
29+
- '{% ifversion ghec %}/copilot/tutorials/roll-out-at-scale/enable-developers/drive-adoption{% endif %}'
30+
- '{% ifversion ghec %}/copilot/tutorials/roll-out-at-scale/enable-developers/integrate-ai-agents{% endif %}'
2531
layout: product-landing
2632
versions:
2733
feature: copilot
@@ -36,4 +42,3 @@ topics:
3642
- Copilot
3743
contentType: landing
3844
---
39-

content/rest/orgs/artifact-metadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Artifact metadata
2+
title: REST API endpoints for artifact metadata
33
shortTitle: Artifact metadata
44
intro: "Use these endpoints to retrieve and manage metadata for artifacts in your organization. Artifact metadata provides information about build artifacts, their provenance, and related details."
55
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// content model, add the entry to this list, and ensure you loop in the
1111
// content and/or content strategy team for review.
1212

13-
export default [
13+
const allowedTopics = [
1414
'2FA',
1515
'Access management',
1616
'Accounts',
@@ -170,4 +170,6 @@ export default [
170170
'Xamarin.iOS',
171171
'Xamarin',
172172
'Xcode',
173-
]
173+
] as const
174+
175+
export default allowedTopics

src/automated-pipelines/tests/rendering.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { get } from '@/tests/helpers/e2etest'
88

99
// Type definitions for page objects
1010
type Page = {
11-
autogenerated?: boolean
11+
autogenerated?: string
1212
fullPath: string
1313
permalinks: Array<{ href: string }>
1414
versions: {

src/content-linter/tests/lint-frontmatter-links.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ describe('front matter', () => {
4949
async (page) => {
5050
const redirectsContext = { redirects, pages }
5151

52-
const trouble = page.includeGuides
53-
// Using any type for uri because includeGuides can contain various URI formats
52+
const trouble = page
53+
.includeGuides! // Using any type for uri because includeGuides can contain various URI formats
5454
.map((uri: any, i: number) => checkURL(uri, i, redirectsContext))
5555
.filter(Boolean)
5656

5757
const customErrorMessage = makeCustomErrorMessage(page, trouble, 'includeGuides')
5858
expect(trouble.length, customErrorMessage).toEqual(0)
5959

6060
const counts = new Map()
61-
for (const guide of page.includeGuides) {
61+
for (const guide of page.includeGuides!) {
6262
counts.set(guide, (counts.get(guide) || 0) + 1)
6363
}
6464
const countUnique = counts.size
6565
let notDistinctMessage = `In ${page.relativePath} there are duplicate links in .includeGuides`
6666
const dupes = [...counts.entries()].filter(([, count]) => count > 1).map(([entry]) => entry)
6767
notDistinctMessage += `\nTo fix this, remove: ${dupes.join(' and ')}`
68-
expect(page.includeGuides.length, notDistinctMessage).toEqual(countUnique)
68+
expect(page.includeGuides!.length, notDistinctMessage).toEqual(countUnique)
6969
},
7070
)
7171

@@ -78,12 +78,17 @@ describe('front matter', () => {
7878
const redirectsContext = { redirects, pages }
7979

8080
const trouble = []
81-
for (const links of Object.values(page.featuredLinks)) {
81+
for (const links of Object.values(page.featuredLinks!)) {
8282
// Some thing in `.featuredLinks` are not arrays.
8383
// For example `popularHeading`. So just skip them.
8484
if (!Array.isArray(links)) continue
8585

86-
trouble.push(...links.map((uri, i) => checkURL(uri, i, redirectsContext)).filter(Boolean))
86+
trouble.push(
87+
...links
88+
.filter((link) => link.href)
89+
.map((link, i) => checkURL(link.href, i, redirectsContext))
90+
.filter(Boolean),
91+
)
8792
}
8893

8994
const customErrorMessage = makeCustomErrorMessage(page, trouble, 'featuredLinks')
@@ -98,7 +103,7 @@ describe('front matter', () => {
98103
const redirectsContext = { redirects, pages }
99104

100105
const trouble = []
101-
for (const linksRaw of Object.values(page.introLinks)) {
106+
for (const linksRaw of Object.values(page.introLinks!)) {
102107
const links = Array.isArray(linksRaw) ? linksRaw : [linksRaw]
103108
trouble.push(
104109
...links

0 commit comments

Comments
 (0)