Skip to content

Commit 77ce25b

Browse files
authored
Merge branch 'main' into cindyalvarez-patch-1
2 parents 69f15f1 + 63cdf12 commit 77ce25b

7,332 files changed

Lines changed: 3144985 additions & 119989 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.

.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
ALGOLIA_API_KEY=
22
ALGOLIA_APPLICATION_ID=
33
ALLOW_TRANSLATION_COMMITS=
4-
EARLY_ACCESS_HOSTNAME=
5-
EARLY_ACCESS_SHARED_SECRET=
6-
GITHUB_TOKEN=

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.eslintrc.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
commonjs: true,
5+
es2020: true,
6+
node: true
7+
},
8+
parser: 'babel-eslint',
9+
extends: [
10+
'eslint:recommended',
11+
'standard'
12+
],
13+
parserOptions: {
14+
ecmaVersion: 11
15+
},
16+
rules: {
17+
},
18+
overrides: [
19+
{
20+
files: [
21+
'**/tests/**/*.js'
22+
],
23+
env: {
24+
jest: true
25+
}
26+
}
27+
]
28+
}

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ package.json @github/docs-engineering
2020
# Site Policy
2121
/content/github/site-policy/ @github/site-policy-admins
2222

23+
# Content strategy
24+
/contributing/content-markup-reference.md @github/docs-content-strategy
25+
/contributing/content-style-guide.md @github/docs-content-strategy
26+
2327
# Make sure that Octokit maintainers get notified about changes
2428
# relevant to the Octokit libraries (https://github.com/octokit)
2529
/content/rest/reference @github/octokit-maintainers

.github/ISSUE_TEMPLATE/improve-existing-docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ labels:
77
assignees: ''
88
---
99
<!--
10-
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT https://github.com/github/docs-content/issues/new/choose INSTEAD.
10+
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT INSTEAD.
1111
-->
1212

1313
<!--
1414
For questions, ask in Discussions: https://github.com/github/docs/discussions
1515
16-
Before you file an issue read the:
16+
Before you file an issue read the:
1717
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
1818
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md
1919

.github/ISSUE_TEMPLATE/improve-the-site.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ assignees: ''
77
---
88

99
<!--
10-
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT https://github.com/github/docs-content/issues/new/choose INSTEAD.
10+
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT INSTEAD.
1111
-->
1212

1313
<!--
1414
For questions, ask in Discussions: https://github.com/github/docs/discussions
1515
16-
Before you file an issue read the:
16+
Before you file an issue read the:
1717
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
1818
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md
1919

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Thanks again!
2121
<!-- Share artifacts of the changes, be they code snippets, GIFs or screenshots; whatever shares the most context. -->
2222

2323
### Check off the following:
24-
- [ ] All of the tests are passing.
25-
- [ ] I have reviewed my changes in staging.
24+
- [ ] I have reviewed my changes in staging. (look for the **deploy-to-heroku** link in your pull request, then click **View deployment**)
2625
- [ ] For content changes, I have reviewed the [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md)
2726
- [ ] For content changes, I have reviewed the [Content style guide for GitHub Docs](https://github.com/github/docs/blob/main/contributing/content-style-guide.md).
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env node
2+
3+
const fs = require('fs')
4+
const core = require('@actions/core')
5+
const eventPayload = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'))
6+
7+
// This workflow-run script does the following:
8+
// 1. Gets an array of labels on a PR.
9+
// 2. Finds one with the relevant Algolia text; if none found, exits early.
10+
// 3. Gets the version substring from the label string.
11+
12+
const labelText = 'sync-english-index-for-'
13+
const labelsArray = eventPayload.pull_request.labels
14+
15+
// Exit early if no labels are on this PR
16+
if (!(labelsArray && labelsArray.length)) {
17+
process.exit(0)
18+
}
19+
20+
// Find the relevant label
21+
const algoliaLabel = labelsArray
22+
.map(label => label.name)
23+
.find(label => label.startsWith(labelText))
24+
25+
// Exit early if no relevant label is found
26+
if (!algoliaLabel) {
27+
process.exit(0)
28+
}
29+
30+
// Given: sync-english-index-for-enterprise-server@3.0
31+
// Returns: enterprise-server@3.0
32+
const versionToSync = algoliaLabel.split(labelText)[1]
33+
34+
// Store the version so we can access it later in the workflow
35+
core.setOutput('versionToSync', versionToSync)
36+
process.exit(0)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env node
2+
3+
const fs = require('fs')
4+
const path = require('path')
5+
const { execSync } = require('child_process')
6+
const semver = require('semver')
7+
8+
/*
9+
* This script performs two checks to prevent shipping development mode OpenAPI schemas:
10+
* - Ensures the `info.version` property is a semantic version.
11+
* In development mode, the `info.version` property is a string
12+
* containing the `github/github` branch name.
13+
* - Ensures the decorated schema matches the dereferenced schema.
14+
* The workflow that calls this script runs `script/rest/update-files.js`
15+
* with the `--decorate-only` switch then checks to see if files changed.
16+
*
17+
*/
18+
19+
// Check that the `info.version` property is a semantic version
20+
const dereferencedDir = path.join(process.cwd(), 'lib/rest/static/dereferenced')
21+
const schemas = fs.readdirSync(dereferencedDir)
22+
schemas.forEach(filename => {
23+
const schema = require(path.join(dereferencedDir, filename))
24+
if (!semver.valid(schema.info.version)) {
25+
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. 🛑`)
26+
process.exit(1)
27+
}
28+
})
29+
30+
// Check that the decorated schema matches the dereferenced schema
31+
const changedFiles = execSync('git diff --name-only HEAD').toString()
32+
33+
if(changedFiles !== '') {
34+
console.log(`These files were changed:\n${changedFiles}`)
35+
console.log(`🚧⚠️ Your decorated and dereferenced schema files don't match. Ensure you're using decorated and dereferenced schemas from the automatically created pull requests by the 'github-openapi-bot' user. For more information, see 'script/rest/README.md'. 🛑`)
36+
process.exit(1)
37+
}
38+
39+
// All checks pass, ready to ship
40+
console.log('All good 👍')
41+
process.exit(0)

.github/allowed-actions.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ module.exports = [
1212
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526', //actions/setup-ruby@v1.1.2
1313
'actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4', //actions/stale@v3.0.13
1414
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
15+
'crykn/copy_folder_to_another_repo_action@abc264e1c16eb3d7b1f7763bfdb0e1699ad43120',
16+
'cschleiden/actions-linter@43fd4e08e52ed40c0e2782dc2425694388851576',
1517
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
1618
'docker://chinthakagodawita/autoupdate-action:v1',
1719
'fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289',
@@ -21,13 +23,17 @@ module.exports = [
2123
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
2224
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
2325
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
26+
'lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8',
2427
'pascalgn/automerge-action@c9bd182',
25-
'peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5',
26-
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
28+
'peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326',
29+
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
30+
'peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43',
2731
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
2832
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
2933
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
3034
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
31-
'rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815',
32-
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0'
35+
'someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd',
36+
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0',
37+
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575',
38+
'dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58'
3339
]

0 commit comments

Comments
 (0)