Skip to content

Commit 78a140d

Browse files
authored
Merge pull request #8231 from github/repo-sync
repo sync
2 parents 71ca3d9 + 42e785b commit 78a140d

File tree

351 files changed

+6472
-8225
lines changed

Some content is hidden

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

351 files changed

+6472
-8225
lines changed

.eslintrc.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ module.exports = {
1212
'prettier'
1313
],
1414
parserOptions: {
15-
ecmaVersion: 11
15+
ecmaVersion: 11,
16+
requireConfigFile: 'false',
17+
babelOptions: { configFile: './.babelrc' }
1618
},
1719
rules: {
18-
'import/no-extraneous-dependencies': ['error'],
20+
'import/no-extraneous-dependencies': ['error', { packageDir: '.' }],
1921
'node/global-require': ['error'],
2022
'import/no-dynamic-require': ['error']
2123
},

.github/actions-scripts/check-for-enterprise-issues-by-label.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/usr/bin/env node
22

3-
const github = require('@actions/github')
4-
const core = require('@actions/core')
3+
import { getOctokit } from '@actions/github'
4+
import { setOutput } from '@actions/core'
55

66
async function run () {
77
const token = process.env.GITHUB_TOKEN
8-
const octokit = github.getOctokit(token)
8+
const octokit = getOctokit(token)
99
const query = encodeURIComponent('is:open repo:github/docs-internal is:issue')
10-
10+
1111
const deprecationIssues = await octokit.request(`GET /search/issues?q=${query}+label:"enterprise%20deprecation"`)
1212
const releaseIssues = await octokit.request(`GET /search/issues?q=${query}+label:"enterprise%20release"`)
1313
const isDeprecationIssue = deprecationIssues.data.items.length === 0 ? 'false' : 'true'
1414
const isReleaseIssue = releaseIssues.data.items.length === 0 ? 'false' : 'true'
15-
core.setOutput('deprecationIssue', isDeprecationIssue)
16-
core.setOutput('releaseIssue', isReleaseIssue)
15+
setOutput('deprecationIssue', isDeprecationIssue)
16+
setOutput('releaseIssue', isReleaseIssue)
1717
return `Set outputs deprecationIssue: ${isDeprecationIssue}, releaseIssue: ${isReleaseIssue}`
1818
}
1919

.github/actions-scripts/create-enterprise-issue.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env node
22

3-
const fs = require('fs')
4-
const path = require('path')
5-
const github = require('@actions/github')
6-
const enterpriseDates = require('../../lib/enterprise-dates')
7-
const { latest, oldestSupported } = require('../../lib/enterprise-server-releases')
3+
import fs from 'fs'
4+
import path from 'path'
5+
import { getOctokit } from '@actions/github'
6+
import enterpriseDates from '../../lib/enterprise-dates.js'
7+
import { latest, oldestSupported } from '../../lib/enterprise-server-releases.js'
8+
89
const acceptedMilestones = ['release', 'deprecation']
910
const teamsToCC = '/cc @github/docs-content @github/docs-engineering'
1011

@@ -31,7 +32,6 @@ const numberOfdaysBeforeDeprecationToOpenIssue = 15
3132
run()
3233

3334
async function run () {
34-
3535

3636
const milestone = process.argv[2]
3737
if (!acceptedMilestones.includes(milestone)) {
@@ -81,7 +81,7 @@ async function run () {
8181
const token = process.env.GITHUB_TOKEN
8282

8383
// Create the milestone issue
84-
const octokit = github.getOctokit(token)
84+
const octokit = getOctokit(token)
8585
try {
8686
issue = await octokit.request('POST /repos/{owner}/{repo}/issues', {
8787
owner: 'github',

.github/actions-scripts/enterprise-algolia-label.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env node
22

3-
const fs = require('fs')
4-
const core = require('@actions/core')
3+
import fs from 'fs'
4+
import { setOutput } from '@actions/core'
5+
56
const eventPayload = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'))
67

78
// This workflow-run script does the following:
@@ -32,5 +33,5 @@ if (!algoliaLabel) {
3233
const versionToSync = algoliaLabel.split(labelText)[1]
3334

3435
// Store the version so we can access it later in the workflow
35-
core.setOutput('versionToSync', versionToSync)
36-
process.exit(0)
36+
setOutput('versionToSync', versionToSync)
37+
process.exit(0)

.github/actions-scripts/openapi-schema-branch.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env node
22

3-
const fs = require('fs')
4-
const path = require('path')
5-
const { execSync } = require('child_process')
6-
const semver = require('semver')
3+
import fs from 'fs'
4+
import path from 'path'
5+
import { execSync } from 'child_process'
6+
import semver from 'semver'
77

88
/*
99
* This script performs two checks to prevent shipping development mode OpenAPI schemas:
@@ -19,8 +19,9 @@ const semver = require('semver')
1919
// Check that the `info.version` property is a semantic version
2020
const dereferencedDir = path.join(process.cwd(), 'lib/rest/static/dereferenced')
2121
const schemas = fs.readdirSync(dereferencedDir)
22+
2223
schemas.forEach(filename => {
23-
const schema = require(path.join(dereferencedDir, filename))
24+
const schema = JSON.parse(fs.readFileSync(path.join(dereferencedDir, filename)))
2425
if (!semver.valid(schema.info.version)) {
2526
console.log(`🚧⚠️ Your branch contains a development mode OpenAPI schema: ${schema.info.version}. This check is a reminder to not 🚢 OpenAPI files in development mode. 🛑`)
2627
process.exit(1)

.github/allowed-actions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// CI will fail and the action will need to be audited by the docs engineering team before it
44
// can be added it this list.
55

6-
module.exports = [
6+
export default [
77
"actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f", // v2.3.4
88
"actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d", // v4.0.2
99
"actions/labeler@5f867a63be70efff62b767459b009290364495eb", // v2.2.0
@@ -17,6 +17,7 @@ module.exports = [
1717
"cschleiden/actions-linter@0ff16d6ac5103cca6c92e6cbc922b646baaea5be",
1818
"dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911",
1919
"docker://chinthakagodawita/autoupdate-action:v1",
20+
"dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58",
2021
"github/codeql-action/analyze@v1",
2122
"github/codeql-action/init@v1",
2223
"juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8",
@@ -34,6 +35,5 @@ module.exports = [
3435
"repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d",
3536
"someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd",
3637
"tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61",
37-
"EndBug/add-and-commit@b3c7c1e078a023d75fb0bd326e02962575ce0519",
38-
"dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58",
39-
];
38+
"EndBug/add-and-commit@b3c7c1e078a023d75fb0bd326e02962575ce0519"
39+
]

.github/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"type":"module"}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ jobs:
5959
- name: Run tests
6060
run: npx jest tests/${{ matrix.test-group }}/
6161
env:
62-
NODE_OPTIONS: '--max_old_space_size=8192'
62+
NODE_OPTIONS: '--max_old_space_size=8192 --experimental-vm-modules'

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ COPY --chown=node:node layouts ./layouts
9393
COPY --chown=node:node lib ./lib
9494
COPY --chown=node:node middleware ./middleware
9595
COPY --chown=node:node translations ./translations
96-
COPY --chown=node:node server.js ./server.js
96+
COPY --chown=node:node server.mjs ./server.mjs
9797
COPY --chown=node:node package*.json ./
9898
COPY --chown=node:node feature-flags.json ./
9999

100100
EXPOSE 80
101101
EXPOSE 443
102102
EXPOSE 4000
103-
CMD ["node", "server.js"]
103+
CMD ["node", "server.mjs"]

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
web: NODE_ENV=production node server.js
1+
web: NODE_ENV=production node server.mjs
22

33
release: NODE_ENV=production script/release-heroku

0 commit comments

Comments
 (0)