Skip to content

Commit 67e63c9

Browse files
authored
Merge branch 'main' into main
2 parents 00a3f72 + 40e2fdc commit 67e63c9

1,861 files changed

Lines changed: 34561 additions & 24190 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,12 @@
3232
"postCreateCommand": "npm ci && npm run build",
3333

3434
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
35-
"remoteUser": "node"
35+
"remoteUser": "node",
36+
37+
// Test restricting low-spec machines
38+
"hostRequirements": {
39+
"cpus": 8,
40+
"memory": "8gb",
41+
"storage": "32gb"
42+
}
3643
}

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
babelOptions: { configFile: './.babelrc' },
1414
sourceType: 'module',
1515
},
16-
ignorePatterns: ['tmp/*'],
16+
ignorePatterns: ['tmp/*', '!/.*', '/.next/'],
1717
rules: {
1818
'import/no-extraneous-dependencies': ['error', { packageDir: '.' }],
1919
},

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/.github/ @github/docs-engineering
1111
/script/ @github/docs-engineering
1212
/includes/ @github/docs-engineering
13+
/lib/search/popular-pages.json @github/docs-engineering
1314
app.json @github/docs-engineering
1415
Dockerfile @github/docs-engineering
1516
package-lock.json @github/docs-engineering

.github/actions-scripts/fr-add-docs-reviewers-requests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ async function run() {
134134
// Exclude existing items going forward.
135135
// Until we have a way to check from a PR whether the PR is in a project,
136136
// this is how we (roughly) avoid overwriting PRs that are already on the board
137-
let newItemIDs = []
138-
let newItemAuthors = []
137+
const newItemIDs = []
138+
const newItemAuthors = []
139139
itemIDs.forEach((id, index) => {
140140
if (!existingItemIDs.includes(id)) {
141141
newItemIDs.push(id)

.github/actions-scripts/ready-for-docs-review.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ async function run() {
8585
// - affected docs sets (not considering changes to data/assets)
8686
let numFiles = 0
8787
let numChanges = 0
88-
let features = new Set([])
89-
const files = data.item.files.nodes.forEach((node) => {
88+
const features = new Set([])
89+
data.item.files.nodes.forEach((node) => {
9090
numFiles += 1
9191
numChanges += node.additions
9292
numChanges += node.deletions
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env node
2+
3+
import * as github from '@actions/github'
4+
5+
import getOctokit from '../../script/helpers/github.js'
6+
7+
const { GITHUB_TOKEN } = process.env
8+
9+
// Exit if GitHub Actions PAT is not found
10+
if (!GITHUB_TOKEN) {
11+
throw new Error('You must supply a GITHUB_TOKEN environment variable!')
12+
}
13+
14+
// This helper uses the `GITHUB_TOKEN` implicitly!
15+
// We're using our usual version of Octokit vs. the provided `github`
16+
// instance to avoid versioning discrepancies.
17+
const octokit = getOctokit()
18+
19+
const { CONTEXT_NAME, ACTIONS_RUN_LOG, HEAD_SHA } = process.env
20+
if (!CONTEXT_NAME) {
21+
throw new Error('$CONTEXT_NAME not set')
22+
}
23+
if (!ACTIONS_RUN_LOG) {
24+
throw new Error('$ACTIONS_RUN_LOG not set')
25+
}
26+
if (!HEAD_SHA) {
27+
throw new Error('$HEAD_SHA not set')
28+
}
29+
30+
const { context } = github
31+
const owner = context.repo.owner
32+
const repo = context.payload.repository.name
33+
34+
await octokit.repos.createCommitStatus({
35+
owner,
36+
repo,
37+
sha: HEAD_SHA,
38+
context: CONTEXT_NAME,
39+
state: 'success',
40+
description: 'Successfully deployed! See logs.',
41+
target_url: ACTIONS_RUN_LOG,
42+
})

.github/actions-scripts/staging-deploy.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (!HEROKU_API_TOKEN) {
2121
// instance to avoid versioning discrepancies.
2222
const octokit = getOctokit()
2323

24-
const { RUN_ID, PR_URL, SOURCE_BLOB_URL, CONTEXT_NAME, ACTIONS_RUN_LOG, HEAD_SHA } = process.env
24+
const { RUN_ID, PR_URL, SOURCE_BLOB_URL } = process.env
2525
if (!RUN_ID) {
2626
throw new Error('$RUN_ID not set')
2727
}
@@ -31,15 +31,6 @@ if (!PR_URL) {
3131
if (!SOURCE_BLOB_URL) {
3232
throw new Error('$SOURCE_BLOB_URL not set')
3333
}
34-
if (!CONTEXT_NAME) {
35-
throw new Error('$CONTEXT_NAME not set')
36-
}
37-
if (!ACTIONS_RUN_LOG) {
38-
throw new Error('$ACTIONS_RUN_LOG not set')
39-
}
40-
if (!HEAD_SHA) {
41-
throw new Error('$HEAD_SHA not set')
42-
}
4334

4435
const { owner, repo, pullNumber } = parsePrUrl(PR_URL)
4536
if (!owner || !repo || !pullNumber) {
@@ -62,13 +53,3 @@ await deployToStaging({
6253
sourceBlobUrl: SOURCE_BLOB_URL,
6354
runId: RUN_ID,
6455
})
65-
66-
await octokit.repos.createCommitStatus({
67-
owner,
68-
repo,
69-
sha: HEAD_SHA,
70-
context: CONTEXT_NAME,
71-
state: 'success',
72-
description: 'Successfully deployed! See logs.',
73-
target_url: ACTIONS_RUN_LOG,
74-
})

.github/workflows/60-days-stale-check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
schedule:
99
- cron: '40 16 * * *' # Run each day at 16:40 UTC / 8:40 PST
1010

11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
1115
jobs:
1216
stale:
1317
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'

.github/workflows/add-review-template.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
types:
1010
- labeled
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
comment-that-approved:
1417
name: Add review template

.github/workflows/auto-label-prs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ name: Auto label Pull Requests
77
on:
88
pull_request:
99

10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
1014
jobs:
1115
triage:
1216
if: github.repository == 'github/docs-internal'

0 commit comments

Comments
 (0)