Skip to content

Commit e8236f2

Browse files
authored
Merge branch 'main' into main
2 parents 2fb62b2 + 9138d04 commit e8236f2

File tree

41,458 files changed

+73005
-1850682
lines changed

Some content is hidden

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

41,458 files changed

+73005
-1850682
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
// Install features. Type 'feature' in the VS Code command palette for a full list.
1919
"features": {
20-
"git-lfs": "latest",
2120
"sshd": "latest"
2221
},
2322

@@ -42,7 +41,7 @@
4241
},
4342

4443
// Use 'postCreateCommand' to run commands after the container is created.
45-
"postCreateCommand": "git lfs pull && npm ci",
44+
"postCreateCommand": "npm ci",
4645

4746
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
4847
"remoteUser": "node"

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ docs/
77
node_modules/
88
script/
99
tests/
10+
# These files are currently being added by automation in github/github. We will be removing the files permanently when we fix the broken automation in github/github.
11+
lib/rest/static/dereferenced
1012
# Folder is cloned during the preview + prod workflows, the assets are merged into other locations for use before the build
1113
docs-early-access/
1214
# During the preview deploy untrusted user code may be cloned into this directory

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
ALLOW_TRANSLATION_COMMITS=

.github/CODEOWNERS

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ Dockerfile @github/docs-engineering
1515
package-lock.json @github/docs-engineering
1616
package.json @github/docs-engineering
1717

18-
# Localization
19-
/.github/actions-scripts/msft-create-translation-batch-pr.js @github/docs-engineering
20-
/.github/workflows/msft-create-translation-batch-pr.yml @github/docs-engineering
21-
/translations/ @Octomerger
22-
2318
# Site Policy
2419
/content/site-policy/ @github/site-policy-admins
2520

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

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,50 +28,58 @@ const MAX_COMMENT_SIZE = 125000
2828

2929
const PROD_URL = 'https://docs.github.com'
3030

31-
run()
31+
// When this file is invoked directly from action as opposed to being imported
32+
if (import.meta.url.endsWith(process.argv[1])) {
33+
const owner = context.repo.owner
34+
const repo = context.payload.repository.name
35+
const baseSHA = context.payload.pull_request.base.sha
36+
const headSHA = context.payload.pull_request.head.sha
3237

33-
async function run() {
3438
const isHealthy = await waitUntilUrlIsHealthy(new URL('/healthz', APP_URL).toString())
3539
if (!isHealthy) {
36-
return core.setFailed(`Timeout waiting for preview environment: ${APP_URL}`)
40+
core.setFailed(`Timeout waiting for preview environment: ${APP_URL}`)
41+
} else {
42+
const markdownTable = await main(owner, repo, baseSHA, headSHA)
43+
core.setOutput('changesTable', markdownTable)
3744
}
45+
}
3846

47+
async function main(owner, repo, baseSHA, headSHA) {
3948
const octokit = github.getOctokit(GITHUB_TOKEN)
4049
// get the list of file changes from the PR
4150
const response = await octokit.rest.repos.compareCommitsWithBasehead({
42-
owner: context.repo.owner,
43-
repo: context.payload.repository.name,
44-
basehead: `${context.payload.pull_request.base.sha}...${context.payload.pull_request.head.sha}`,
51+
owner,
52+
repo,
53+
basehead: `${baseSHA}...${headSHA}`,
4554
})
4655

4756
const { files } = response.data
4857

49-
let markdownTable =
50-
'| **Source** | **Preview** | **Production** | **What Changed** |\n|:----------- |:----------- |:----------- |:----------- |\n'
58+
const markdownTableHead = [
59+
'| **Source** | **Preview** | **Production** | **What Changed** |',
60+
'|:----------- |:----------- |:----------- |:----------- |',
61+
]
62+
let markdownTable = ''
5163

5264
const pathPrefix = 'content/'
53-
const articleFiles = files.filter(
54-
({ filename }) => filename.startsWith(pathPrefix) && !filename.endsWith('/index.md')
55-
)
65+
const articleFiles = files.filter(({ filename }) => filename.startsWith(pathPrefix))
5666

5767
const lines = await Promise.all(
5868
articleFiles.map(async (file) => {
5969
const sourceUrl = file.blob_url
6070
const fileName = file.filename.slice(pathPrefix.length)
61-
const fileUrl = fileName.slice(0, fileName.lastIndexOf('.'))
71+
const fileUrl = fileName.replace('/index.md', '').replace(/\.md$/, '')
6272

6373
// get the file contents and decode them
6474
// this script is called from the main branch, so we need the API call to get the contents from the branch, instead
6575
const fileContents = await getContents(
66-
context.repo.owner,
67-
context.payload.repository.name,
76+
owner,
77+
repo,
6878
// Can't get its content if it no longer exists.
6979
// Meaning, you'd get a 404 on the `getContents()` utility function.
7080
// So, to be able to get necessary meta data about what it *was*,
7181
// if it was removed, fall back to the 'base'.
72-
file.status === 'removed'
73-
? context.payload.pull_request.base.sha
74-
: context.payload.pull_request.head.sha,
82+
file.status === 'removed' ? baseSHA : headSHA,
7583
file.filename
7684
)
7785

@@ -164,7 +172,13 @@ async function run() {
164172
return previous
165173
}, markdownTable.length)
166174

175+
if (cappedLines.length) {
176+
cappedLines.unshift(...markdownTableHead)
177+
}
178+
167179
markdownTable += cappedLines.join('\n')
168180

169-
core.setOutput('changesTable', markdownTable)
181+
return markdownTable
170182
}
183+
184+
export default main

.github/actions-scripts/enterprise-server-issue-templates/release-issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ This file should be automatically updated, but you can also run `script/update-e
101101
102102
### 🚢 🛳️ 🚢 Shipping the release branch
103103
104-
- [ ] The megabranch creator should push the search index LFS objects for the public `github/docs` repo. The LFS objects were already pushed for the internal repo after the `sync-english-index-for-<PLAN@RELEASE>` was added to the megabranch. To push the LFS objects to the public repo:
104+
- [ ] Sync the search indices for the new release:
105105
1. First navigate to the [sync search indices workflow](https://github.com/github/docs-internal/actions/workflows/sync-search-indices.yml).
106106
2. Then, to run the workflow with parameters, click on `Run workflow` button.
107107
3. A modal will pop up where you will set the following inputs:

.github/actions-scripts/msft-create-translation-batch-pr.js

Lines changed: 0 additions & 142 deletions
This file was deleted.

0 commit comments

Comments
 (0)