Skip to content

Commit faad989

Browse files
authored
Merge branch 'main' into correction-of-redirecting-link-in-content
2 parents baf19d1 + b58f0ea commit faad989

812 files changed

Lines changed: 22239 additions & 12244 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.

.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/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/browser-test.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ name: Browser Tests
66

77
on:
88
workflow_dispatch:
9-
push:
10-
branches:
11-
- main
129
pull_request:
1310
paths:
1411
- '**.js'
@@ -56,7 +53,7 @@ jobs:
5653
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
5754
with:
5855
path: .next/cache
59-
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}-${{ hashFiles('.github/workflows/browser-test.yml') }}
56+
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
6057

6158
- name: Cache lib/redirects/.redirects-cache_en_ja.json
6259
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353

.github/workflows/check-all-english-links.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
cache: npm
3535
- name: npm ci
3636
run: npm ci
37+
- name: Cache nextjs build
38+
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
39+
with:
40+
path: .next/cache
41+
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
3742
- name: npm run build
3843
run: npm run build
3944
- name: Run script

.github/workflows/code-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- '**.yaml'
1919
- '**.yml'
2020
- '**.scss'
21+
- .eslintrc.js
2122
# In case something like eslint or tsc or prettier upgrades
2223
- 'package-lock.json'
2324
# Ultimately, for debugging this workflow itself

.github/workflows/enterprise-release-sync-search-index.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jobs:
5757
id: getVersion
5858
run: $GITHUB_WORKSPACE/.github/actions-scripts/enterprise-search-label.js
5959

60+
- name: Cache nextjs build
61+
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
62+
with:
63+
path: .next/cache
64+
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
65+
6066
- name: Generate the search index files
6167
if: ${{ steps.getVersion.outputs.versionToSync }}
6268
env:

.github/workflows/link-check-dotcom.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
- name: Install
3333
run: npm ci
3434

35+
- name: Cache nextjs build
36+
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
37+
with:
38+
path: .next/cache
39+
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
40+
3541
- name: Build
3642
run: npm run build
3743

0 commit comments

Comments
 (0)