Skip to content

Commit 1696b2d

Browse files
authored
Merge pull request #46408 from github/repo-sync
Repo sync
2 parents efd4783 + 0f6b6ea commit 1696b2d

23 files changed

Lines changed: 326 additions & 63 deletions

File tree

‎.github/actions/cache-nextjs/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
using: 'composite'
1010
steps:
1111
- name: Cache .next/cache
12-
uses: actions/cache@v4
12+
uses: actions/cache@v6
1313
with:
1414
path: ${{ github.workspace }}/.next/cache
1515
# Packages and source files both invalidate the cache.

‎.github/actions/get-docs-early-access/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
run: npm run what-docs-early-access-branch
2020

2121
- name: Clone
22-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
22+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2323
with:
2424
repository: github/docs-early-access
2525
token: ${{ inputs.token }}

‎.github/actions/node-npm-setup/action.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
using: 'composite'
77
steps:
88
- name: Cache node_modules
9-
uses: actions/cache@v4
9+
uses: actions/cache@v6
1010
id: cache-node_modules
1111
env:
1212
# Cache restore failures are acceptable, so keep the segment timeout short.
@@ -17,7 +17,7 @@ runs:
1717

1818
# The npm download cache only helps npm ci, so skip its 153 MB restore when node_modules hits.
1919
- name: Setup Node.js
20-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
20+
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
2121
with:
2222
node-version-file: 'package.json'
2323
package-manager-cache: false

‎.github/actions/slack-alert/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ runs:
6464
} >> "$GITHUB_OUTPUT"
6565
6666
- name: Send Slack notification if workflow fails
67-
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
67+
uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0
6868
with:
6969
method: chat.postMessage
7070
token: ${{ inputs.slack_token }}

‎.github/actions/warmup-remotejson-cache/action.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
steps:
1313
# Restore a stable key, add to the cache, then save by SHA so the cache can grow without bound.
1414
- name: Cache .remotejson-cache (restore)
15-
uses: actions/cache/restore@v4
15+
uses: actions/cache/restore@v6
1616
with:
1717
path: .remotejson-cache
1818
key: remotejson-cache-
@@ -27,7 +27,7 @@ runs:
2727

2828
- name: Cache .remotejson-cache (save)
2929
if: ${{ inputs.restore-only == '' }}
30-
uses: actions/cache/save@v4
30+
uses: actions/cache/save@v6
3131
with:
3232
path: .remotejson-cache
3333
key: remotejson-cache-${{ github.sha }}

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Update the base image digest from the gh-base-noble package page:
66
# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble
7-
FROM ghcr.io/github/gh-base-image/gh-base-noble:20261016-181622-g7dfd3798b@sha256:d41c754579434b9b6479a3d3786a6a84ad7be50ce64626bbc07579ab4c36302b AS base
7+
FROM ghcr.io/github/gh-base-image/gh-base-noble:20261020-225427-g5ec2175c5@sha256:931ce7d43f6f3dbe28113cb12f5fac2206a0b08dad395172f6d73ce4f95f77f3 AS base
88
# Install curl for NodeSource setup.
99
# Install git for early-access and translation clones.
1010
# Ubuntu's nodejs package lags the Node LTS release line.

‎package-lock.json‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/audit-logs/components/GroupedEvents.tsx‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ export default function GroupedEvents({ auditLogEvents, category, categoryNote }
2828
.filter((link) => link && link !== 'N/A')
2929
.map(normalizeReferenceLink)
3030

31-
// Titles can contain ', ', so a single link keeps its whole title.
32-
const titles = !event.docs_reference_titles
33-
? links
34-
: links.length === 1
35-
? [event.docs_reference_titles]
36-
: event.docs_reference_titles.split(', ')
31+
// Older generated data joins titles with ', ', and titles can contain ', ',
32+
// so a single link keeps its whole title.
33+
const storedTitles = event.docs_reference_titles
34+
const titles = Array.isArray(storedTitles)
35+
? storedTitles
36+
: !storedTitles
37+
? links
38+
: links.length === 1
39+
? [storedTitles]
40+
: storedTitles.split(', ')
3741

3842
return links.map((link, index) => (
3943
<span key={link}>

‎src/audit-logs/lib/index.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ async function computeReferenceLinksToMarkdown(
194194
async function resolveReferenceLinksToTitles(
195195
docsReferenceLinks: string,
196196
context: TitleResolutionContext,
197-
): Promise<string> {
197+
): Promise<string[]> {
198198
if (!docsReferenceLinks || docsReferenceLinks === 'N/A') {
199-
return ''
199+
return []
200200
}
201201

202202
const links = docsReferenceLinks
@@ -233,7 +233,7 @@ async function resolveReferenceLinksToTitles(
233233
}
234234
}
235235

236-
return titles.join(', ')
236+
return titles
237237
}
238238

239239
export function getAuditLogEvents(page: string, version: string): AuditLogEventT[] {

‎src/audit-logs/tests/unit/deduplication.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ describe('audit log deduplication', () => {
141141
expect(reconstructed[i].action).toBe(original[i].action)
142142
expect(reconstructed[i].description).toBe(original[i].description)
143143
expect(reconstructed[i].docs_reference_links).toBe(original[i].docs_reference_links)
144-
expect(reconstructed[i].docs_reference_titles).toBe(original[i].docs_reference_titles)
144+
expect(reconstructed[i].docs_reference_titles).toEqual(
145+
original[i].docs_reference_titles,
146+
)
145147
if (original[i].fields) {
146148
expect(reconstructed[i].fields).toEqual(original[i].fields)
147149
}

0 commit comments

Comments
 (0)