Skip to content

Commit a527d1b

Browse files
authored
Merge branch 'main' into education-add-blackboard-lms
2 parents a8d320b + 1fa5506 commit a527d1b

File tree

4,390 files changed

+1213187
-108381
lines changed

Some content is hidden

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

4,390 files changed

+1213187
-108381
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
// Set *default* container specific settings.json values on container create.
2020
"settings": {
2121
"terminal.integrated.shell.linux": "/bin/bash",
22-
"cSpell.language": ",en"
22+
"cSpell.language": ",en",
23+
"git.autofetch": true
2324
},
2425
// Visual Studio Code extensions which help authoring for docs.github.com.
2526
"extensions": [

.env.example

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ BUILD_RECORDS_MAX_CONCURRENT=100
2020
BUILD_RECORDS_MIN_TIME=
2121

2222
# Set to true to enable the /fastly-cache-test route for debugging Fastly headers
23-
ENABLE_FASTLY_TESTING=
23+
ENABLE_FASTLY_TESTING=
24+
25+
# Needed to auth for AI search
26+
CSE_COPILOT_SECRET=
27+
CSE_COPILOT_ENDPOINT=https://cse-copilot-staging.service.iad.github.net
28+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Thank you for contributing to this project! You must fill out the information be
44

55
### Why:
66

7+
<!-- Paste the issue link or number here -->
78
Closes:
89

910
<!-- If there's an existing issue for your change, please link to it above.
@@ -16,7 +17,6 @@ If you made changes to the `content` directory, a table will populate in a comme
1617

1718
### Check off the following:
1819

19-
- [ ] I have reviewed my changes in staging, available via the **View deployment** link in this PR's timeline (this link will be available after opening the PR).
20-
21-
- For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the `data` directory.
22-
- [ ] For content changes, I have completed the [self-review checklist](https://docs.github.com/en/contributing/collaborating-on-github-docs/self-review-checklist).
20+
- [ ] A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
21+
- [ ] The changes in this PR meet [the docs fundamentals that are required for all content](http://docs.github.com/en/contributing/writing-for-github-docs/about-githubs-documentation-fundamentals).
22+
- [ ] All CI checks are passing and the changes look good in the preview environment.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
using: 'composite'
99
steps:
1010
- name: Cache .next/cache
11-
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
11+
uses: actions/cache@v4
1212
with:
1313
path: ${{ github.workspace }}/.next/cache
1414
# Generate a new cache whenever packages or source files change.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runs:
1616
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1717
GITHUB_TOKEN: ${{ inputs.token }}
1818
shell: bash
19-
run: node src/early-access/scripts/what-docs-early-access-branch.js
19+
run: npm run what-docs-early-access-branch
2020

2121
- name: Clone
2222
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

.github/actions/labeler/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323
using: 'composite'
2424
steps:
2525
- name: Add label to an issue or pr
26-
run: node .github/actions/labeler/labeler.js
26+
run: npm run labeler
2727
shell: bash
2828
env:
2929
GITHUB_TOKEN: ${{ inputs.token }}

.github/actions/labeler/labeler.js renamed to .github/actions/labeler/labeler.ts

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
/* See function main in this file for documentation */
22

33
import coreLib from '@actions/core'
4-
5-
import github from '#src/workflows/github.js'
6-
import { getActionContext } from '#src/workflows/action-context.js'
7-
import { boolEnvVar } from '#src/workflows/get-env-inputs.js'
4+
import { type Octokit } from '@octokit/rest'
5+
import { CoreInject } from '@/links/scripts/action-injections'
6+
7+
import github from '#src/workflows/github.ts'
8+
import { getActionContext } from '#src/workflows/action-context.ts'
9+
import { boolEnvVar } from '#src/workflows/get-env-inputs.ts'
10+
11+
type Options = {
12+
addLabels?: string[]
13+
removeLabels?: string[]
14+
ignoreIfAssigned?: boolean
15+
ignoreIfLabeled?: boolean
16+
issue_number?: number
17+
owner?: string
18+
repo?: string
19+
}
820

921
// When this file is invoked directly from action as opposed to being imported
1022
if (import.meta.url.endsWith(process.argv[1])) {
@@ -16,28 +28,19 @@ if (import.meta.url.endsWith(process.argv[1])) {
1628

1729
const octokit = github()
1830

19-
const opts = {
20-
addLabels: ADD_LABELS,
21-
removeLabels: REMOVE_LABELS,
31+
const opts: Options = {
2232
ignoreIfAssigned: boolEnvVar('IGNORE_IF_ASSIGNED'),
2333
ignoreIfLabeled: boolEnvVar('IGNORE_IF_LABELED'),
2434
}
2535

2636
// labels come in comma separated from actions
27-
let addLabels
28-
29-
if (opts.addLabels) {
30-
addLabels = [...opts.addLabels.split(',')]
31-
opts.addLabels = addLabels.map((l) => l.trim())
37+
if (typeof ADD_LABELS === 'string') {
38+
opts.addLabels = [...ADD_LABELS.split(',')].map((l) => l.trim())
3239
} else {
3340
opts.addLabels = []
3441
}
35-
36-
let removeLabels
37-
38-
if (opts.removeLabels) {
39-
removeLabels = [...opts.removeLabels.split(',')]
40-
opts.removeLabels = removeLabels.map((l) => l.trim())
42+
if (typeof REMOVE_LABELS === 'string') {
43+
opts.removeLabels = [...REMOVE_LABELS.split(',')].map((l) => l.trim())
4144
} else {
4245
opts.removeLabels = []
4346
}
@@ -54,7 +57,7 @@ if (import.meta.url.endsWith(process.argv[1])) {
5457
opts.owner = owner
5558
opts.repo = repo
5659

57-
main(coreLib, octokit, opts, {})
60+
main(coreLib, octokit, opts)
5861
}
5962

6063
/*
@@ -69,22 +72,31 @@ if (import.meta.url.endsWith(process.argv[1])) {
6972
* ignoreIfAssigned {boolean} don't apply labels if there are assignees
7073
* ignoreIfLabeled {boolean} don't apply labels if there are already labels added
7174
*/
72-
export default async function main(core, octokit, opts = {}) {
75+
export default async function main(
76+
core: typeof coreLib | CoreInject,
77+
octokit: Octokit,
78+
opts: Options = {},
79+
) {
7380
if (opts.addLabels?.length === 0 && opts.removeLabels?.length === 0) {
7481
core.info('No labels to add or remove specified, nothing to do.')
7582
return
7683
}
7784

85+
if (!opts.issue_number || !opts.owner || !opts.repo) {
86+
throw new Error(`Missing required parameters ${JSON.stringify(opts)}`)
87+
}
88+
const issueOpts = {
89+
issue_number: opts.issue_number,
90+
owner: opts.owner,
91+
repo: opts.repo,
92+
}
93+
7894
if (opts.ignoreIfAssigned || opts.ignoreIfLabeled) {
7995
try {
80-
const { data } = await octokit.issues.get({
81-
issue_number: opts.issue_number,
82-
owner: opts.owner,
83-
repo: opts.repo,
84-
})
96+
const { data } = await octokit.issues.get(issueOpts)
8597

8698
if (opts.ignoreIfAssigned) {
87-
if (data.assignees.length > 0) {
99+
if (data.assignees?.length) {
88100
core.info(
89101
`ignore-if-assigned is true: not applying labels since there's ${data.assignees.length} assignees`,
90102
)
@@ -105,31 +117,24 @@ export default async function main(core, octokit, opts = {}) {
105117
}
106118
}
107119

108-
if (opts.removeLabels?.length > 0) {
120+
if (opts.removeLabels?.length) {
109121
// removing a label fails if the label isn't already applied
110122
let appliedLabels = []
111123

112124
try {
113-
const { data } = await octokit.issues.get({
114-
issue_number: opts.issue_number,
115-
owner: opts.owner,
116-
repo: opts.repo,
117-
})
118-
119-
appliedLabels = data.labels.map((l) => l.name)
125+
const { data } = await octokit.issues.get(issueOpts)
126+
appliedLabels = data.labels.map((l) => (typeof l === 'string' ? l : l.name))
120127
} catch (err) {
121128
throw new Error(`Error getting issue: ${err}`)
122129
}
123130

124-
opts.removeLabels = opts.removeLabels.filter((l) => appliedLabels.includes(l))
131+
opts.removeLabels = opts.removeLabels?.filter((l) => appliedLabels.includes(l))
125132

126133
await Promise.all(
127134
opts.removeLabels.map(async (label) => {
128135
try {
129136
await octokit.issues.removeLabel({
130-
issue_number: opts.issue_number,
131-
owner: opts.owner,
132-
repo: opts.repo,
137+
...issueOpts,
133138
name: label,
134139
})
135140
} catch (err) {
@@ -138,17 +143,15 @@ export default async function main(core, octokit, opts = {}) {
138143
}),
139144
)
140145

141-
if (opts.removeLabels.length > 0) {
146+
if (opts.removeLabels?.length) {
142147
core.info(`Removed labels: ${opts.removeLabels.join(', ')}`)
143148
}
144149
}
145150

146-
if (opts.addLabels?.length > 0) {
151+
if (opts.addLabels?.length) {
147152
try {
148153
await octokit.issues.addLabels({
149-
issue_number: opts.issue_number,
150-
owner: opts.owner,
151-
repo: opts.repo,
154+
...issueOpts,
152155
labels: opts.addLabels,
153156
})
154157

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

Lines changed: 1 addition & 1 deletion
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@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
9+
uses: actions/cache@v4
1010
id: cache-node_modules
1111
env:
1212
# Default is 10 min, per segment, but we can make it much smaller

.github/actions/precompute-pageinfo/action.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@ runs:
1717
# Optionally, you can have it just do A (and not B and C).
1818

1919
- name: Cache .pageinfo-cache.json.br (restore)
20-
# You can't use a SHA on these. Only possible with `actions/cache@SHA...`
21-
uses: actions/cache/restore@v3
20+
uses: actions/cache/restore@v4
2221
with:
2322
path: .pageinfo-cache.json.br
2423
key: pageinfo-cache-
2524
restore-keys: pageinfo-cache-
2625

27-
# When we use this composite action from the workflows like
28-
# Azure Preview Deploy and Azure Production Deploy, we don't have
29-
# any Node installed or any of its packages. I.e. we never
26+
# When we use this composite action from deployment workflows
27+
# we don't have any Node installed or any of its packages. I.e. we never
3028
# run `npm ci` in those actions. For security sake.
3129
# So we can't do things that require Node code.
3230
# Tests and others will omit the `restore-only` input, but
@@ -40,7 +38,7 @@ runs:
4038

4139
- name: Cache .remotejson-cache (save)
4240
if: ${{ inputs.restore-only == '' }}
43-
uses: actions/cache/save@v3
41+
uses: actions/cache/save@v4
4442
with:
4543
path: .pageinfo-cache.json.br
4644
key: pageinfo-cache-${{ github.sha }}

.github/actions/setup-elasticsearch/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
# Cache the elasticsearch image to prevent Docker Hub rate limiting
2020
- name: Cache Docker layers
2121
id: cache-docker-layers
22-
uses: actions/cache@v2
22+
uses: actions/cache@v4
2323
with:
2424
path: /tmp/docker-cache
2525
key: ${{ runner.os }}-elasticsearch-${{ inputs.elasticsearch_version }}

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ runs:
1414
# You "wrap" the step that appends to disk and it will possibly retrieve
1515
# some from the cache, then save it when it's got more in it.
1616
- name: Cache .remotejson-cache (restore)
17-
# You can't use a SHA on these. Only possible with `actions/cache@SHA...`
18-
uses: actions/cache/restore@v3
17+
uses: actions/cache/restore@v4
1918
with:
2019
path: .remotejson-cache
2120
key: remotejson-cache-
2221
restore-keys: remotejson-cache-
2322

24-
# When we use this composite action from the workflows like
25-
# Azure Preview Deploy and Azure Production Deploy, we don't have
26-
# any Node installed or any of its packages. I.e. we never
23+
# When we use this composite action from deployment workflows
24+
# we don't have any Node installed or any of its packages. I.e. we never
2725
# run `npm ci` in those actions. For security sake.
2826
# So we can't do things that require Node code.
2927
# Tests and others will omit the `restore-only` input, but
@@ -33,11 +31,11 @@ runs:
3331
- name: Run script
3432
if: ${{ inputs.restore-only == '' }}
3533
shell: bash
36-
run: node src/archives/scripts/warmup-remotejson.js
34+
run: npm run warmup-remotejson
3735

3836
- name: Cache .remotejson-cache (save)
3937
if: ${{ inputs.restore-only == '' }}
40-
uses: actions/cache/save@v3
38+
uses: actions/cache/save@v4
4139
with:
4240
path: .remotejson-cache
4341
key: remotejson-cache-${{ github.sha }}

.github/branch_protection_settings/main.json

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/required_status_checks",
55
"strict": true,
66
"contexts": [
7-
"Build and deploy Azure preview environment",
87
"automated-pipelines",
98
"github-apps",
109
"graphql",
@@ -41,14 +40,13 @@
4140
"workflows",
4241
"lint-code",
4342
"secret-scanning",
44-
"pagelist"
43+
"pagelist",
44+
"docs-internal-docker-image / docs-internal-docker-image",
45+
"docs-internal-docker-security / docs-internal-docker-security",
46+
"docs-internal-moda-config-bundle / docs-internal-moda-config-bundle"
4547
],
4648
"contexts_url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/required_status_checks/contexts",
4749
"checks": [
48-
{
49-
"context": "Build and deploy Azure preview environment",
50-
"app_id": 15368
51-
},
5250
{ "context": "automated-pipelines", "app_id": 15368 },
5351
{ "context": "github-apps", "app_id": 15368 },
5452
{ "context": "graphql", "app_id": 15368 },
@@ -85,7 +83,19 @@
8583
{ "context": "workflows", "app_id": 15368 },
8684
{ "context": "lint-code", "app_id": 15368 },
8785
{ "context": "secret-scanning", "app_id": 15368 },
88-
{ "context": "pagelist", "app_id": 15368 }
86+
{ "context": "pagelist", "app_id": 15368 },
87+
{
88+
"context": "docs-internal-docker-image / docs-internal-docker-image",
89+
"app_id": 15368
90+
},
91+
{
92+
"context": "docs-internal-docker-security / docs-internal-docker-security",
93+
"app_id": 15368
94+
},
95+
{
96+
"context": "docs-internal-moda-config-bundle / docs-internal-moda-config-bundle",
97+
"app_id": 15368
98+
}
8999
]
90100
},
91101
"restrictions": {

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
version: 2
2+
registries:
3+
ghcr: # Define access for a private registry
4+
type: docker-registry
5+
url: ghcr.io
6+
username: PAT
7+
password: ${{secrets.CONTAINER_BUILDER_TOKEN}}
28
updates:
39
- package-ecosystem: npm
410
directory: '/'
@@ -23,11 +29,18 @@ updates:
2329
- dependency-name: '*'
2430
update-types:
2531
['version-update:semver-patch', 'version-update:semver-minor']
32+
- dependency-name: 'github/internal-actions'
2633

2734
- package-ecosystem: 'docker'
35+
registries:
36+
- ghcr
2837
directory: '/'
2938
schedule:
3039
interval: weekly
3140
day: thursday
41+
groups:
42+
baseImages:
43+
patterns:
44+
- '*'
3245
ignore:
3346
- dependency-name: 'node'

0 commit comments

Comments
 (0)