Merge branch 'main' into patch-2
@@ -13,7 +13,7 @@ module.exports = {
|
||||
babelOptions: { configFile: './.babelrc' },
|
||||
sourceType: 'module',
|
||||
},
|
||||
ignorePatterns: ['tmp/*', '!/.*', '/.next/'],
|
||||
ignorePatterns: ['tmp/*', '!/.*', '/.next/', 'script/bookmarklets/*'],
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': ['error', { packageDir: '.' }],
|
||||
},
|
||||
|
||||
@@ -18,11 +18,8 @@ If you aren't comfortable going through the steps alone, sync up with a docs eng
|
||||
```
|
||||
script/update-enterprise-dates.js
|
||||
```
|
||||
- [ ] 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`:
|
||||
- [ ] Create REST files based on previous version. Copy the latest GHES version of the dereferenced file from `lib/rest/static/dereferenced` to a new file in the same directory for the new GHES release. Ex, `cp lib/rest/static/dereferenced/ghes-3.4.deref.json lib/rest/static/dereferenced/ghes-3.5.deref.json`. Then run `script/rest/updated-files.js --decorate-only` and check in the resulting files.
|
||||
|
||||
```
|
||||
script/enterprise-server-releases/create-rest-files.js --oldVersion <PLAN@RELEASE> --newVersion <PLAN@RELEASE>
|
||||
```
|
||||
- [ ] Create GraphQL files based on previous version:
|
||||
|
||||
```
|
||||
|
||||
2
.github/workflows/autoupdate-branch.yml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo content
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
13
.github/workflows/azure-preview-env-deploy.yml
vendored
@@ -59,6 +59,7 @@ jobs:
|
||||
IS_INTERNAL_BUILD: ${{ github.repository == 'github/docs-internal' }}
|
||||
# This may also run in forked repositories, not just 'github/docs'
|
||||
IS_PUBLIC_BUILD: ${{ github.repository != 'github/docs-internal' }}
|
||||
NONPROD_REGISTRY_USERNAME: ${{ fromJSON('["ghdocs", "ghdocsinternal"]')[github.repository == 'github/docs-internal'] }}
|
||||
|
||||
steps:
|
||||
- name: 'Az CLI login'
|
||||
@@ -70,7 +71,7 @@ jobs:
|
||||
uses: azure/docker-login@81744f9799e7eaa418697cb168452a2882ae844a
|
||||
with:
|
||||
login-server: ${{ secrets.NONPROD_REGISTRY_SERVER }}
|
||||
username: ${{ secrets.NONPROD_REGISTRY_USERNAME }}
|
||||
username: ${{ env.NONPROD_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
@@ -78,7 +79,7 @@ jobs:
|
||||
|
||||
- if: ${{ env.IS_PUBLIC_BUILD == 'true' }}
|
||||
name: Check out main branch
|
||||
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
ref: 'main'
|
||||
persist-credentials: 'false'
|
||||
@@ -86,7 +87,7 @@ jobs:
|
||||
|
||||
- if: ${{ env.IS_INTERNAL_BUILD == 'true' }}
|
||||
name: Check out PR code
|
||||
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
ref: ${{ env.COMMIT_REF }}
|
||||
# To prevent issues with cloning early access content later
|
||||
@@ -138,7 +139,7 @@ jobs:
|
||||
|
||||
- if: ${{ env.IS_INTERNAL_BUILD == 'true' }}
|
||||
name: Clone docs-early-access
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-early-access
|
||||
token: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
@@ -151,7 +152,7 @@ jobs:
|
||||
|
||||
- if: ${{ env.IS_PUBLIC_BUILD == 'true' }}
|
||||
name: Check out user code to temp directory
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
path: ./user-code
|
||||
ref: ${{ env.COMMIT_REF }}
|
||||
@@ -205,7 +206,7 @@ jobs:
|
||||
parameters: appName="${{ env.APP_NAME }}"
|
||||
containerImage="${{ env.DOCKER_IMAGE }}"
|
||||
dockerRegistryUrl="${{ secrets.NONPROD_REGISTRY_SERVER }}"
|
||||
dockerRegistryUsername="${{ secrets.NONPROD_REGISTRY_USERNAME }}"
|
||||
dockerRegistryUsername="${{ env.NONPROD_REGISTRY_USERNAME }}"
|
||||
dockerRegistryPassword="${{ secrets.NONPROD_REGISTRY_PASSWORD }}"
|
||||
# this shows warnings in the github actions console, because the flag is passed through a validation run,
|
||||
# but it *is* functional during the actual execution
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
creds: ${{ secrets.NONPROD_AZURE_CREDENTIALS }}
|
||||
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Get preview app info
|
||||
env:
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25
|
||||
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
# To prevent issues with cloning early access content later
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
cache: npm
|
||||
|
||||
- name: Clone docs-early-access
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-early-access
|
||||
token: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
|
||||
4
.github/workflows/browser-test.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
run: npm ci --include=optional
|
||||
|
||||
- name: Cache nextjs build
|
||||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
|
||||
with:
|
||||
path: .next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
REPORT_REPOSITORY: github/docs-content
|
||||
steps:
|
||||
- name: Check out repo's default branch
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
with:
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: npm ci
|
||||
run: npm ci
|
||||
- name: Cache nextjs build
|
||||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
|
||||
with:
|
||||
path: .next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
exit 1 # prevents further steps from running
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
@@ -50,6 +50,19 @@ jobs:
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build server
|
||||
run: npm run build
|
||||
|
||||
- name: Start server in the background
|
||||
env:
|
||||
NODE_ENV: production
|
||||
PORT: 4000
|
||||
run: |
|
||||
|
||||
node server.mjs &
|
||||
sleep 5
|
||||
curl --retry-connrefused --retry 3 -I http://localhost:4000/
|
||||
|
||||
- name: Run broken github/github link check
|
||||
run: |
|
||||
script/check-github-github-links.js > broken_github_github_links.md
|
||||
|
||||
2
.github/workflows/code-lint.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
6
.github/workflows/codeql.yml
vendored
@@ -30,9 +30,9 @@ jobs:
|
||||
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
- uses: github/codeql-action/init@1a927e9307bc11970b2c679922ebc4d03a5bd980
|
||||
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
- uses: github/codeql-action/init@1ed1437484560351c5be56cf73a48a279d116b78
|
||||
with:
|
||||
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!)
|
||||
- uses: github/codeql-action/analyze@1a927e9307bc11970b2c679922ebc4d03a5bd980
|
||||
- uses: github/codeql-action/analyze@1ed1437484560351c5be56cf73a48a279d116b78
|
||||
continue-on-error: true
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
steps:
|
||||
- name: check out repo content
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Get preview app info
|
||||
env:
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
run: .github/actions-scripts/content-changes-table-comment.js
|
||||
|
||||
- name: Find content directory changes comment
|
||||
uses: peter-evans/find-comment@d2dae40ed151c634e4189471272b57e76ec19ba8
|
||||
uses: peter-evans/find-comment@1769778a0c5bd330272d749d12c036d65e70d39d
|
||||
id: findComment
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
- run: git config --global user.email "67483024+docubot@users.noreply.github.com"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
|
||||
2
.github/workflows/crowdin-cleanup.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
2
.github/workflows/docs-review-collect.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Check out repo content
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
4
.github/workflows/enterprise-dates.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
exit 1 # prevents further steps from running
|
||||
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
|
||||
- name: Create pull request
|
||||
id: create-pull-request
|
||||
uses: peter-evans/create-pull-request@f22a7da129c901513876a2380e2dae9f8e145330
|
||||
uses: peter-evans/create-pull-request@bd72e1b7922d417764d27d30768117ad7da78a0e
|
||||
env:
|
||||
# Disable pre-commit hooks; they don't play nicely here
|
||||
HUSKY: '0'
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
token: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
run: $GITHUB_WORKSPACE/.github/actions-scripts/enterprise-search-label.js
|
||||
|
||||
- name: Cache nextjs build
|
||||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
|
||||
with:
|
||||
path: .next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
|
||||
|
||||
2
.github/workflows/link-check-all.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
@@ -26,6 +26,7 @@ jobs:
|
||||
env:
|
||||
ENABLE_EARLY_ACCESS: ${{ github.repository == 'github/docs-internal' }}
|
||||
DOCKER_IMAGE_CACHE_REF: ${{ secrets.NONPROD_REGISTRY_SERVER }}/${{ github.repository }}:main-preview
|
||||
NONPROD_REGISTRY_USERNAME: ${{ fromJSON('["ghdocs", "ghdocsinternal"]')[github.repository == 'github/docs-internal'] }}
|
||||
|
||||
steps:
|
||||
- name: 'Az CLI login'
|
||||
@@ -37,14 +38,14 @@ jobs:
|
||||
uses: azure/docker-login@81744f9799e7eaa418697cb168452a2882ae844a
|
||||
with:
|
||||
login-server: ${{ secrets.NONPROD_REGISTRY_SERVER }}
|
||||
username: ${{ secrets.NONPROD_REGISTRY_USERNAME }}
|
||||
username: ${{ env.NONPROD_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25
|
||||
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
# To prevent issues with cloning early access content later
|
||||
persist-credentials: 'false'
|
||||
@@ -55,7 +56,7 @@ jobs:
|
||||
|
||||
- if: ${{ env.ENABLE_EARLY_ACCESS }}
|
||||
name: Clone docs-early-access
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-early-access
|
||||
token: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
|
||||
2
.github/workflows/manually-purge-fastly.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
2
.github/workflows/open-enterprise-issue.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
2
.github/workflows/openapi-decorate.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
add-labels: 'github-openapi-bot'
|
||||
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
# actions/checkout by default will leave you in a detached head state
|
||||
# so we need to specify the PR head ref explicitly since we're making
|
||||
|
||||
2
.github/workflows/openapi-schema-check.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
|
||||
steps:
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
2
.github/workflows/optimize-images.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo on head ref
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
# Need to specify a PAT here because otherwise GITHUB_TOKEN is used
|
||||
|
||||
2
.github/workflows/orphaned-assets-check.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
# Using a PAT is necessary so that the new commit will trigger the
|
||||
# CI in the PR. (Events from GITHUB_TOKEN don't trigger new workflows.)
|
||||
|
||||
2
.github/workflows/os-ready-for-review.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
exit 1
|
||||
|
||||
- name: Check out repo content
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
4
.github/workflows/pa11y.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
run: npm ci --include=optional
|
||||
|
||||
- name: Cache nextjs build
|
||||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
|
||||
with:
|
||||
path: .next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
|
||||
|
||||
2
.github/workflows/package-lock-lint.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
2
.github/workflows/ready-for-doc-review.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo content
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
|
||||
4
.github/workflows/remove-unused-assets.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
echo 'The repo is currently frozen! Exiting this workflow.'
|
||||
exit 1 # prevents further steps from running
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
with:
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
- name: Remove script results file
|
||||
run: rm ./results.md
|
||||
- name: Create pull request
|
||||
uses: peter-evans/create-pull-request@f22a7da129c901513876a2380e2dae9f8e145330
|
||||
uses: peter-evans/create-pull-request@bd72e1b7922d417764d27d30768117ad7da78a0e
|
||||
env:
|
||||
# Disable pre-commit hooks; they don't play nicely here
|
||||
HUSKY: '0'
|
||||
|
||||
4
.github/workflows/repo-sync.yml
vendored
@@ -98,7 +98,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
# Set up npm and run npm ci to run husky to get githooks for LFS
|
||||
- name: Setup node
|
||||
@@ -120,7 +120,7 @@ jobs:
|
||||
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
|
||||
- name: Create pull request
|
||||
uses: repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3
|
||||
uses: repo-sync/pull-request@65785d95a5a466e46a9d0708933a3bd51bbf9dde
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
with:
|
||||
|
||||
4
.github/workflows/site-policy-sync.yml
vendored
@@ -26,10 +26,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout docs-internal
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: checkout public site-policy
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/site-policy
|
||||
token: ${{ secrets.API_TOKEN_SITEPOLICY }}
|
||||
|
||||
4
.github/workflows/sync-search-indices.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
||||
exit 1 # prevents further steps from running
|
||||
# Check out internal docs repository
|
||||
- name: checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
token: ${{ secrets.DOCS_BOT_FR }}
|
||||
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
run: npm ci
|
||||
|
||||
- name: Cache nextjs build
|
||||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
|
||||
with:
|
||||
path: .next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
|
||||
|
||||
4
.github/workflows/sync-search-pr.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
run: npm ci
|
||||
|
||||
- name: Cache nextjs build
|
||||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
|
||||
with:
|
||||
path: .next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
|
||||
|
||||
6
.github/workflows/test.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
|
||||
# Even if if doesn't do anything
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
# Not all test suites need the LFS files. So instead, we opt to
|
||||
# NOT clone them initially and instead, include them manually
|
||||
@@ -87,7 +87,7 @@ jobs:
|
||||
|
||||
- name: Check out docs-early-access too, if internal repo
|
||||
if: ${{ github.repository == 'github/docs-internal' }}
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-early-access
|
||||
token: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
@@ -132,7 +132,7 @@ jobs:
|
||||
run: npm ci
|
||||
|
||||
- name: Cache nextjs build
|
||||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
|
||||
with:
|
||||
path: .next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
|
||||
|
||||
@@ -30,9 +30,7 @@ jobs:
|
||||
if: github.repository == 'github/docs-internal' && github.event.pull_request.user.login != 'Octomerger'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
notAllowed: ${{ steps.filter.outputs.notAllowed }}
|
||||
notAllowedSearchSyncLabel: ${{ steps.filter.outputs.notAllowedSearchSyncLabel }}
|
||||
count: 0
|
||||
steps:
|
||||
- name: Get files changed
|
||||
uses: dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58
|
||||
@@ -55,7 +53,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
token: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
|
||||
4
.github/workflows/update-graphql-files.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
echo 'The repo is currently frozen! Exiting this workflow.'
|
||||
exit 1 # prevents further steps from running
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
|
||||
with:
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
script/graphql/update-files.js
|
||||
- name: Create pull request
|
||||
id: create-pull-request
|
||||
uses: peter-evans/create-pull-request@f22a7da129c901513876a2380e2dae9f8e145330
|
||||
uses: peter-evans/create-pull-request@bd72e1b7922d417764d27d30768117ad7da78a0e
|
||||
env:
|
||||
# Disable pre-commit hooks; they don't play nicely here
|
||||
HUSKY: '0'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
translations/
|
||||
includes/
|
||||
data/release-notes/
|
||||
script/bookmarklets/
|
||||
|
||||
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 122 KiB |
BIN
assets/images/help/branches/confirm-deleting-branch.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.9 KiB |
BIN
assets/images/help/codespaces/advanced-options.png
Normal file
|
After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 47 KiB |
BIN
assets/images/help/codespaces/codespaces-accept-permissions.png
Normal file
|
After Width: | Height: | Size: 187 KiB |
|
After Width: | Height: | Size: 64 KiB |
BIN
assets/images/help/codespaces/configuration-file-choice.png
Normal file
|
After Width: | Height: | Size: 123 KiB |
BIN
assets/images/help/codespaces/default-machine-type.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 81 KiB |
BIN
assets/images/help/codespaces/prebuilt-codespace-found.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 195 KiB |
|
After Width: | Height: | Size: 194 KiB |
|
After Width: | Height: | Size: 172 KiB |
|
After Width: | Height: | Size: 206 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 159 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 195 KiB |
BIN
assets/images/help/desktop/enterprise-sign-in-button-browser.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
BIN
assets/images/help/enterprises/pending-invitations-tab.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
assets/images/help/enterprises/pending-invitations-type-tabs.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 44 KiB |
BIN
assets/images/help/organizations/customize_pins_link.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 19 KiB |
BIN
assets/images/help/organizations/new_organization_page.png
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
assets/images/help/organizations/org_member_readme.png
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
assets/images/help/organizations/org_profile_view.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
assets/images/help/organizations/org_public_readme.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
assets/images/help/organizations/pin_repositories_link.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
assets/images/help/organizations/pinned_repo_dialog.png
Normal file
|
After Width: | Height: | Size: 113 KiB |
BIN
assets/images/help/organizations/suggested-tasks-button.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 39 KiB |
BIN
assets/images/help/security/enable-ghas-private-repo.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 68 KiB |
@@ -88,10 +88,7 @@ export const DefaultLayout = (props: Props) => {
|
||||
<SidebarNav />
|
||||
{/* Need to set an explicit height for sticky elements since we also
|
||||
set overflow to auto */}
|
||||
<div
|
||||
className="flex-column flex-1 overflow-auto print-overflow-visible"
|
||||
style={{ height: '100vh' }}
|
||||
>
|
||||
<div className="flex-column flex-1">
|
||||
<Header />
|
||||
<main id="main-content" style={{ scrollMarginTop: '5rem' }}>
|
||||
<DeprecationBanner />
|
||||
|
||||
@@ -218,7 +218,11 @@ export function Search({
|
||||
<div className="position-relative z-2">
|
||||
<form role="search" className="width-full d-flex" noValidate onSubmit={onFormSubmit}>
|
||||
<label className="text-normal width-full">
|
||||
<span className="visually-hidden">{t`placeholder`}</span>
|
||||
<span
|
||||
className="visually-hidden"
|
||||
aria-label={t`label`}
|
||||
aria-describedby={t`description`}
|
||||
>{t`placeholder`}</span>
|
||||
<input
|
||||
data-testid="site-search-input"
|
||||
ref={inputRef}
|
||||
@@ -237,13 +241,15 @@ export function Search({
|
||||
)}
|
||||
type="search"
|
||||
placeholder={t`placeholder`}
|
||||
autoComplete="off"
|
||||
autoComplete={localQuery ? 'on' : 'off'}
|
||||
autoCorrect="off"
|
||||
autoCapitalize="off"
|
||||
spellCheck="false"
|
||||
maxLength={512}
|
||||
onChange={onSearch}
|
||||
value={localQuery}
|
||||
aria-label={t`label`}
|
||||
aria-describedby={t`description`}
|
||||
/>
|
||||
</label>
|
||||
<button className="d-none" type="submit" title="Submit the search query." hidden />
|
||||
@@ -393,7 +399,12 @@ function ShowSearchResults({
|
||||
You're searching the <strong>{searchVersion}</strong> version.
|
||||
</p>
|
||||
<div className="float-right mr-4">
|
||||
<p className={cx(styles.selectWording, 'f6 d-inline-block')}>Select version:</p>
|
||||
<p
|
||||
aria-describedby={`You're searching the ${searchVersion} version`}
|
||||
className={cx(styles.selectWording, 'f6 d-inline-block')}
|
||||
>
|
||||
Select version:
|
||||
</p>
|
||||
<DropdownMenu
|
||||
placeholder={searchVersion}
|
||||
items={searchVersions}
|
||||
|
||||
@@ -26,7 +26,7 @@ const SUPPORTED_LANGUAGES = ['json', 'javascript', 'curl']
|
||||
// </pre>
|
||||
//
|
||||
const CODE_ELEMENTS_PARENT_SELECTOR = '[data-highlight]'
|
||||
const CODE_SELECTOR = 'pre code'
|
||||
const CODE_SELECTOR = 'div code' || 'pre code'
|
||||
|
||||
export default function ClientSideHighlightJS() {
|
||||
const { asPath } = useRouter()
|
||||
|
||||
37
components/context/RestContext.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import { createContext, useContext } from 'react'
|
||||
|
||||
export type MiniTocItem = {
|
||||
platform: string
|
||||
contents: string & { title: string; href: string }
|
||||
items?: MiniTocItem[]
|
||||
}
|
||||
|
||||
export type RestContextT = {
|
||||
title: string
|
||||
intro: string
|
||||
renderedPage: string | JSX.Element[]
|
||||
miniTocItems: Array<MiniTocItem>
|
||||
}
|
||||
|
||||
export const RestContext = createContext<RestContextT | null>(null)
|
||||
|
||||
export const useRestContext = (): RestContextT => {
|
||||
const context = useContext(RestContext)
|
||||
|
||||
if (!context) {
|
||||
throw new Error('"useRestContext" may only be used inside "RestContext.Provider"')
|
||||
}
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
export const getRestContextFromRequest = (req: any): RestContextT => {
|
||||
const page = req.context.page
|
||||
|
||||
return {
|
||||
title: page.titlePlainText,
|
||||
intro: page.intro,
|
||||
renderedPage: req.context.renderedPage || '',
|
||||
miniTocItems: req.context.miniTocItems || [],
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useRouter } from 'next/router'
|
||||
import dynamic from 'next/dynamic'
|
||||
|
||||
import { DefaultLayout } from 'components/DefaultLayout'
|
||||
import { TableOfContents } from 'components/landing/TableOfContents'
|
||||
import { useTocLandingContext } from 'components/context/TocLandingContext'
|
||||
@@ -10,6 +14,13 @@ import { Callout } from 'components/ui/Callout'
|
||||
import { Lead } from 'components/ui/Lead'
|
||||
import { LearningTrackNav } from 'components/article/LearningTrackNav'
|
||||
|
||||
const ClientSideRedirectExceptions = dynamic(
|
||||
() => import('components/article/ClientsideRedirectExceptions'),
|
||||
{
|
||||
ssr: false,
|
||||
}
|
||||
)
|
||||
|
||||
export const TocLanding = () => {
|
||||
const {
|
||||
title,
|
||||
@@ -23,8 +34,38 @@ export const TocLanding = () => {
|
||||
} = useTocLandingContext()
|
||||
const { t } = useTranslation('toc')
|
||||
|
||||
const { asPath } = useRouter()
|
||||
// We have some one-off redirects for rest api docs
|
||||
// currently those are limited to the repos page, but
|
||||
// that will grow soon as we restructure the rest api docs.
|
||||
// This is a workaround to updating the hardcoded links
|
||||
// directly in the REST API code in a separate repo, which
|
||||
// requires many file changes and teams to sign off.
|
||||
// While the organization is turbulent, we can do this.
|
||||
// Once it's more settled, we can refactor the rest api code
|
||||
// to leverage the OpenAPI urls rather than hardcoded urls.
|
||||
// The code below determines if we should bother loading this redirecting
|
||||
// component at all.
|
||||
// The reason this isn't done at the server-level is because there you
|
||||
// can't possibly access the URL hash. That's only known in client-side
|
||||
// code.
|
||||
const [loadClientsideRedirectExceptions, setLoadClientsideRedirectExceptions] = useState(false)
|
||||
useEffect(() => {
|
||||
const { hash } = window.location
|
||||
// Today, Jan 2022, it's known explicitly what the pathname.
|
||||
// In the future there might be more.
|
||||
// Hopefully, we can some day delete all of this and no longer
|
||||
// be dependent on the URL hash to do the redirect.
|
||||
if (hash && asPath.startsWith('/rest')) {
|
||||
setLoadClientsideRedirectExceptions(true)
|
||||
}
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<DefaultLayout>
|
||||
{/* Doesn't matter *where* this is included because it will
|
||||
never render anything. It always just return null. */}
|
||||
{loadClientsideRedirectExceptions && <ClientSideRedirectExceptions />}
|
||||
<div className="container-xl px-3 px-md-6 my-4">
|
||||
<ArticleGridLayout>
|
||||
<ArticleTitle>{title}</ArticleTitle>
|
||||
|
||||