Skip to content

Commit f80b9af

Browse files
authored
Merge branch 'main' into codespaces-prebuilds-ga
2 parents 3b5412b + 33c1fd7 commit f80b9af

File tree

2,280 files changed

+216234
-15539
lines changed

Some content is hidden

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

2,280 files changed

+216234
-15539
lines changed

.github/actions-scripts/content-changes-table-comment.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ if (!APP_URL) {
2020
throw new Error(`APP_URL environment variable not set`)
2121
}
2222

23+
// the max size of the comment (in bytes)
24+
// the action we use to post the comment caps out at about 144kb
25+
// see docs-engineering#1849 for more info
26+
const MAX_COMMENT_SIZE = 125000
27+
2328
const PROD_URL = 'https://docs.github.com'
2429
const octokit = github.getOctokit(GITHUB_TOKEN)
2530

@@ -131,5 +136,25 @@ const lines = await Promise.all(
131136
return `| ${contentCell} | ${previewCell} | ${prodCell} | ${note} |`
132137
})
133138
)
134-
markdownTable += lines.join('\n')
139+
140+
// this section limits the size of the comment
141+
const cappedLines = []
142+
let underMax = true
143+
144+
lines.reduce((previous, current, index, array) => {
145+
if (underMax) {
146+
if (previous + current.length > MAX_COMMENT_SIZE) {
147+
underMax = false
148+
cappedLines.push('**Note** There are more changes in this PR than we can show.')
149+
return previous
150+
}
151+
152+
cappedLines.push(array[index])
153+
return previous + current.length
154+
}
155+
return previous
156+
}, markdownTable.length)
157+
158+
markdownTable += cappedLines.join('\n')
159+
135160
setOutput('changesTable', markdownTable)

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

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
check_all_english_links:
1818
name: Check all links
1919
if: github.repository == 'github/docs-internal'
20-
runs-on: ubuntu-latest
20+
runs-on: self-hosted
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
2323
FIRST_RESPONDER_PROJECT: Docs content first responder
@@ -50,18 +50,32 @@ jobs:
5050
NODE_ENV: production
5151
PORT: 4000
5252
DISABLE_OVERLOAD_PROTECTION: true
53-
DISABLE_RENDER_CACHING: true
53+
DISABLE_RENDERING_CACHE: true
5454
# We don't want or need the changelog entries in this context.
5555
CHANGELOG_DISABLED: true
5656
# The default is 10s. But because this runs overnight, we can
5757
# be a lot more patient.
5858
REQUEST_TIMEOUT: 20000
59+
# Don't care about CDN caching image URLs
60+
DISABLE_REWRITE_ASSET_URLS: true
5961
run: |
60-
node server.mjs &
62+
node server.mjs > /tmp/stdout.log 2> /tmp/stderr.log &
6163
sleep 5
62-
curl --retry-connrefused --retry 3 -I http://localhost:4000/
64+
curl --retry-connrefused --retry 4 -I http://localhost:4000/
65+
66+
- if: ${{ failure() }}
67+
name: Debug server outputs on errors
68+
run: |
69+
echo "____STDOUT____"
70+
cat /tmp/stdout.log
71+
echo "____STDERR____"
72+
cat /tmp/stderr.log
6373
6474
- name: Run script
75+
env:
76+
# The default is 300 which works OK on a fast macbook pro
77+
# but not so well in Actions.
78+
LINKINATOR_CONCURRENCY: 100
6579
run: |
6680
script/check-english-links.js > broken_links.md
6781
@@ -73,11 +87,6 @@ jobs:
7387
#
7488
# https://docs.github.com/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions
7589

76-
- if: ${{ failure() }}
77-
name: Debug broken_links.md
78-
run: |
79-
ls -lh broken_links.md
80-
wc -l broken_links.md
8190
- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
8291
if: ${{ failure() }}
8392
with:

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
run: cat $HOME/files.json
5050

5151
- name: Link check (warnings, changed files)
52+
env:
53+
# Don't care about CDN caching image URLs
54+
DISABLE_REWRITE_ASSET_URLS: true
5255
run: |
5356
./script/rendered-content-link-checker.mjs \
5457
--language en \
@@ -59,6 +62,9 @@ jobs:
5962
--list $HOME/files.json
6063
6164
- name: Link check (critical, all files)
65+
env:
66+
# Don't care about CDN caching image URLs
67+
DISABLE_REWRITE_ASSET_URLS: true
6268
run: |
6369
./script/rendered-content-link-checker.mjs \
6470
--language en \

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
26.8 KB
27.2 KB
14.7 KB

0 commit comments

Comments
 (0)