Skip to content

Commit dc89a16

Browse files
authored
Merge pull request #12503 from github/repo-sync
repo sync
2 parents 267cf25 + fae539f commit dc89a16

1,567 files changed

Lines changed: 57181 additions & 37464 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.

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ package-lock.json @github/docs-engineering
1616
package.json @github/docs-engineering
1717

1818
# Localization
19+
/.github/workflows/create-translation-batch-pr.yml @github/docs-localization
1920
/.github/workflows/crowdin.yml @github/docs-localization
2021
/crowdin*.yml @github/docs-engineering @github/docs-localization
2122
/translations/ @github/docs-engineering @github/docs-localization @github-actions
23+
/translations/log/ @github/docs-localization
2224

2325
# Site Policy
2426
/content/github/site-policy/ @github/site-policy-admins
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/usr/bin/env node
2+
3+
import path from 'path'
4+
import fs from 'fs'
5+
import zlib from 'zlib'
6+
import walk from 'walk-sync'
7+
8+
const DRY_RUN = Boolean(JSON.parse(process.env.DRY_RUN || 'false'))
9+
// Roughly 100KiB means about 25 files at the moment.
10+
// Set this too low and the overheads will be more than the disk and
11+
// network I/O that this intends to serve.
12+
const MIN_GZIP_SIZE = Number(process.env.MIN_GZIP_SIZE || 1024 * 100)
13+
14+
const BROTLI_OPTIONS = {
15+
params: {
16+
[zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT,
17+
[zlib.constants.BROTLI_PARAM_QUALITY]: 6,
18+
},
19+
}
20+
main()
21+
22+
async function main() {
23+
compressFromPattern('lib/**/static/**/*.json')
24+
}
25+
26+
async function compressFromPattern(pattern) {
27+
const glob = pattern.includes('*') ? pattern.split(path.sep).slice(1).join(path.sep) : undefined
28+
const walkOptions = {
29+
globs: glob ? [glob] : undefined,
30+
directories: false,
31+
includeBasePath: true,
32+
}
33+
const root = path.resolve(pattern.includes('*') ? pattern.split(path.sep)[0] : pattern)
34+
const filePaths = walk(root, walkOptions).filter((filePath) => {
35+
return fs.statSync(filePath).size > MIN_GZIP_SIZE
36+
})
37+
38+
if (!DRY_RUN) {
39+
console.time(`Compress ${filePaths.length} files`)
40+
const compressed = await Promise.all(filePaths.map(compressFile))
41+
console.timeEnd(`Compress ${filePaths.length} files`)
42+
43+
console.time(`Delete ${compressed.length} files`)
44+
compressed.forEach((filePath) => fs.unlinkSync(filePath))
45+
console.timeEnd(`Delete ${compressed.length} files`)
46+
}
47+
}
48+
49+
function compressFile(filePath) {
50+
return new Promise((resolve, reject) => {
51+
const contentStream = fs.createReadStream(filePath)
52+
const newFilePath = `${filePath}.br`
53+
const writeStream = fs.createWriteStream(newFilePath)
54+
const compressor = zlib.createBrotliCompress(BROTLI_OPTIONS)
55+
contentStream
56+
.pipe(compressor)
57+
.pipe(writeStream)
58+
.on('finish', (err) => {
59+
if (err) return reject(err)
60+
resolve(filePath)
61+
})
62+
})
63+
}

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ If you aren't comfortable going through the steps alone, sync up with a docs eng
1212
- [ ] Increment the `next` variable above the `supported` array (e.g., new release number + `.1`).
1313
- [ ] Increment the `nextNext` variable above the `supported` array (e.g., new release number + `.2`).
1414
- [ ] Update the GHES dates file:
15-
- [ ] Make sure you have a `.env` file at the root directory of your local checkout, and that it contains a PAT in the format of `GITHUB_TOKEN=<token>`.
15+
- [ ] Make sure you have a `.env` file at the root directory of your local checkout, and that it contains a PAT in the format of `GITHUB_TOKEN=<token>` with `repo` scope. Ensure the PAT is SSO-enabled for the `github` org.
1616
- [ ] Run the script to update the dates file:
1717

1818
```
1919
script/update-enterprise-dates.js
2020
```
21-
- [ ] Create REST files based on previous version:
21+
- [ ] Create REST files based on previous version. For example `script/enterprise-server-releases/create-rest-files.js --oldVersion enterprise-server@3.2 --newVersion enterprise-server@3.3`:
2222
2323
```
2424
script/enterprise-server-releases/create-rest-files.js --oldVersion <PLAN@RELEASE> --newVersion <PLAN@RELEASE>
@@ -33,7 +33,7 @@ If you aren't comfortable going through the steps alone, sync up with a docs eng
3333
```
3434
script/enterprise-server-releases/create-webhook-files.js --oldVersion <PLAN@RELEASE> --newVersion <PLAN@RELEASE>
3535
```
36-
- [ ] Create a placeholder release notes file called `data/release-notes/<PRODUCT>/<RELEASE NUMBER>/PLACEHOLDER.yml`. For example `data/release-notes/3-1/PLACEHOLDER.yml`. Add the following placeholder content to the file:
36+
- [ ] Create a placeholder release notes file called `data/release-notes/<PRODUCT>/<RELEASE NUMBER>/PLACEHOLDER.yml`. For example `data/release-notes/enterprise-server/3-1/PLACEHOLDER.yml`. Add the following placeholder content to the file:
3737
3838
```
3939
date: '2021-05-04'
@@ -55,6 +55,8 @@ If you aren't comfortable going through the steps alone, sync up with a docs eng
5555
script/enterprise-server-releases/release-banner.js --action create --version <PLAN@RELEASE>
5656
```
5757
58+
- [ ] Create a PR with the above changes. This PR is used to track all docs changes and smoke tests associated with the release. For example https://github.com/github/docs-internal/pull/22286.
59+
5860
### When the `docs-internal` release branch is open
5961
6062
- [ ] Add a label to the PR in this format:
@@ -102,7 +104,7 @@ This file should be automatically updated, but you can also run `script/update-e
102104
Usually, we should smoke test any new GHES admin guides, any large features landing in this GHES version for the first time, and the REST and GraphQL API references.
103105
- [ ] Alert the Neon Squad (formally docs-ecosystem team) 1-2 days before the release to deploy to `github/github`. A PR should already be open in `github/github`, to change `published` to `true` in `app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml`. They will need to:
104106
- [ ] Get the required approval from `@github/ecosystem-api-reviewers` then deploy the PR to dotcom. This process generally takes 30-90 minutes.
105-
- [ ] Once the PR merges, make sure that the auto-generated PR titled "Update OpenAPI Descriptions" in doc-internal contains both the derefrenced and decorated JSON files for the new GHES release. If everything looks good, merge the "Update OpenAPI Description" PR into the GHES release megabranch.
107+
- [ ] Once the PR merges, make sure that the auto-generated PR titled "Update OpenAPI Descriptions" in doc-internal contains both the derefrenced and decorated JSON files for the new GHES release. If everything looks good, merge the "Update OpenAPI Description" PR into the GHES release megabranch. **Note:** Be careful about resolving the conflicts correctly—you may wish to delete the existing OpenAPI files for the release version from the megabranch, so there are no conflicts to resolve and to ensure that the incoming artifacts are the correct ones.
106108
- [ ] Add a blocking review to the auto-generated "Update OpenAPI Descriptions" PR in the public REST API description. (Remove this blocking review once the GHES release ships.)
107109
- [ ] [Freeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) at least 1-2 days before the release, and post an announcement in Slack so everybody knows.
108110
@@ -113,8 +115,9 @@ This file should be automatically updated, but you can also run `script/update-e
113115
114116
Use admin permissions to ship the release branch with this failure. Make sure that the merge's commit title does not include anything like `[DO NOT MERGE]`, and remove all the branch's commit details from the merge's commit message except for the co-author list.
115117
- [ ] Do any required smoke tests listed in the opening post in the megabranch PR.
116-
- [ ] Push the search index LFS objects for the public `github/docs` repo. The LFS objects were already being pushed for the internal repo after the `sync-english-index-for-<PLAN@RELEASE>` was added to the megabranch. To push the LFS objects, run the [search sync workflow](https://github.com/github/docs-internal/actions/workflows/sync-search-indices.yml) with the following inputs:
118+
- [ ] Once smoke tests have passed, you can [unfreeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) and post an announcement in Slack.
119+
- [ ] After unfreezing, push the search index LFS objects for the public `github/docs` repo. The LFS objects were already being pushed for the internal repo after the `sync-english-index-for-<PLAN@RELEASE>` was added to the megabranch. To push the LFS objects, run the [search sync workflow](https://github.com/github/docs-internal/actions/workflows/sync-search-indices.yml) with the following inputs:
117120
version: `enterprise-server@<RELEASE>`
118121
language: `en`
119-
- [ ] Once smoke tests have passed, you can [unfreeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) and post an announcement in Slack.
120-
- [ ] After the release, in the `docs-content` repo, add the now live version number to the "Specific GHES version(s)" section in the following files: [`.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml). When the PR is approved, merge it in.
122+
- [ ] After unfreezing, if there were significant or highlighted GraphQL changes in the release, consider manually running the [GraphQL update workflow](https://github.com/github/docs-internal/actions/workflows/update-graphql-files.yml) to update our GraphQL schemas. By default this workflow only runs once every 24 hours.
123+
- [ ] After the release, in the `docs-content` repo, add the now live version number to the "Specific GHES version(s)" section in the following files: [`.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml). When the PR is approved, merge it in.

.github/allowed-actions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
export default [
77
'actions/cache@c64c572235d810460d0d6876e9c705ad5002b353', // v2.1.6
8-
'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97', // v2.3.5
8+
'actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579', // v2.4.0
99
'actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d', // v4.0.2
1010
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', // v2.2.0
11-
'actions/setup-node@270253e841af726300e85d718a5f606959b2903c', // v2.4.1
11+
'actions/setup-node@04c56d2f954f1e4c69436aa54cfef261a018f458', // v2.5.0
1212
'actions/stale@cdf15f641adb27a71842045a94023bef6945e3aa', // v4.0.0
1313
'actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074', // v2.2.4
1414
'alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488', // v0.8.1

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
only-labels: 'engineering,Triaged,Improve existing docs,Core,Ecosystem'
2424
stale-issue-label: 'stale'
2525
stale-pr-label: 'stale'
26-
exempt-pr-labels: 'never-stale'
26+
exempt-pr-labels: 'never-stale,waiting for review'
2727
exempt-issue-labels: 'never-stale,help wanted,waiting for review'

.github/workflows/autoupdate-branch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Check out repo content
34-
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
34+
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
3535

3636
- name: Setup Node
37-
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
37+
uses: actions/setup-node@04c56d2f954f1e4c69436aa54cfef261a018f458
3838
with:
3939
node-version: 16.13.x
4040
cache: npm

.github/workflows/browser-test.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ on:
1010
branches:
1111
- main
1212
pull_request:
13+
paths:
14+
- '**.js'
15+
- '**.mjs'
16+
- '**.ts'
17+
- '**.tsx'
18+
- jest.config.js
19+
- package.json
20+
# In case something like eslint or tsc or prettier upgrades
21+
- package-lock.json
22+
# Ultimately, for debugging this workflow itself
23+
- .github/workflows/browser-test.yml
1324

1425
jobs:
1526
build:
@@ -18,19 +29,24 @@ jobs:
1829
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
1930
# Even if if doesn't do anything
2031
- name: Checkout
21-
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
32+
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
2233
with:
2334
lfs: true
2435
- name: Checkout LFS objects
2536
run: git lfs checkout
2637

2738
- name: Setup Node
28-
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
39+
uses: actions/setup-node@04c56d2f954f1e4c69436aa54cfef261a018f458
2940
with:
3041
node-version: 16.13.x
3142
cache: npm
3243

3344
- name: Install dependencies
45+
env:
46+
# This makes it so the puppeteer npm package doesn't bother
47+
# to download a copy of chromium because it can use
48+
# `$PUPPETEER_EXECUTABLE_PATH` from the ubuntu Action container.
49+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
3450
run: npm ci --include=optional
3551

3652
- name: Run browser-test

.github/workflows/build-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Check out repo
33-
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
33+
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
3434
- name: Build the container
3535
run: docker build --target production .

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
REPORT_REPOSITORY: github/docs-content
2323
steps:
2424
- name: Check out repo's default branch
25-
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
25+
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
2626
- name: Setup Node
27-
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
27+
uses: actions/setup-node@04c56d2f954f1e4c69436aa54cfef261a018f458
2828
with:
2929
node-version: 16.13.x
3030
cache: npm

.github/workflows/check-broken-links-github-github.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
exit 1 # prevents further steps from running
3737
3838
- name: Checkout
39-
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
39+
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
4040

4141
- name: Setup Node
42-
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
42+
uses: actions/setup-node@04c56d2f954f1e4c69436aa54cfef261a018f458
4343
with:
4444
node-version: 16.13.x
4545
cache: npm

0 commit comments

Comments
 (0)