diff --git a/.github/actions-scripts/purge-fastly-edge-cache.js b/.github/actions-scripts/purge-fastly-edge-cache.js index 9582be1031..e3de5c2e5d 100755 --- a/.github/actions-scripts/purge-fastly-edge-cache.js +++ b/.github/actions-scripts/purge-fastly-edge-cache.js @@ -2,10 +2,4 @@ import purgeEdgeCache from '../../script/deployment/purge-edge-cache.js' -try { - await purgeEdgeCache() -} catch (error) { - console.error(`Failed to purge the edge cache: ${error.message}`) - console.error(error) - throw error -} +await purgeEdgeCache() diff --git a/.github/actions-scripts/update-merge-queue-branch.js b/.github/actions-scripts/update-merge-queue-branch.js index 8c8c061532..94add99e8c 100644 --- a/.github/actions-scripts/update-merge-queue-branch.js +++ b/.github/actions-scripts/update-merge-queue-branch.js @@ -8,15 +8,17 @@ const github = getOctokit(token) // https://docs.github.com/en/graphql/reference/enums#mergestatestatus // https://docs.github.com/en/graphql/reference/enums#mergeablestate -/* - This script gets a list of automerge-enabled PRs and sorts them +/* + This script gets a list of automerge-enabled PRs and sorts them by priority. The PRs with the skip-to-front-of-merge-queue label - are prioritized first. The rest of the PRs are sorted by the date - they were updated. This is basically a FIFO queue, while allowing + are prioritized first. The rest of the PRs are sorted by the date + they were updated. This is basically a FIFO queue, while allowing writers the ability to skip the line when high-priority ships are needed but a freeze isn't necessary. */ +const DRY_RUN = Boolean(JSON.parse(process.env.DRY_RUN || 'false')) + main() async function main() { @@ -47,6 +49,15 @@ async function main() { name } } + commits(last: 1) { + nodes { + commit { + statusCheckRollup { + state + } + } + } + } } } pageInfo { @@ -105,6 +116,14 @@ async function main() { // a PR is green and the automerge is enabled .filter((pr) => pr.mergeStateStatus !== 'DIRTY') .filter((pr) => pr.mergeStateStatus !== 'UNSTABLE') + .filter((pr) => { + const nodes = pr.commits.nodes + if (!nodes || !nodes.length) { + // If it has no commits, why is it even here? Anyway, skip it. + return false + } + return nodes[0].commit.statusCheckRollup.state !== 'FAILURE' + }) autoMergeEnabledPRs.push(...filteredPrs) } @@ -120,11 +139,15 @@ async function main() { if (prioritizedPrList.length) { const nextInQueue = prioritizedPrList.shift() // Update the branch for the next PR in the merge queue - github.rest.pulls.updateBranch({ - owner: org, - repo, - pull_number: nextInQueue.number, - }) + if (DRY_RUN) { + console.log('DRY RUN! But *would* update on next-in-queue') + } else { + github.rest.pulls.updateBranch({ + owner: org, + repo, + pull_number: nextInQueue.number, + }) + } console.log(`⏱ Total PRs in the merge queue: ${prioritizedPrList.length + 1}`) console.log(`🚂 Updated branch for PR #${JSON.stringify(nextInQueue, null, 2)}`) } diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index e447b1dc5c..934191d5d4 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -49,5 +49,17 @@ jobs: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true run: npm ci --include=optional + - name: Cache nextjs build + uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 + with: + path: .next/cache + key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}-${{ hashFiles('.github/workflows/browser-test.yml') }} + + - name: Cache lib/redirects/.redirects-cache_en_ja.json + uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 + with: + path: lib/redirects/.redirects-cache_en_ja.json + key: ${{ runner.os }}-redirects-cache-${{ hashFiles('.github/workflows/browser-test.yml') }} + - name: Run browser-test run: npm run browser-test diff --git a/.github/workflows/js-lint.yml b/.github/workflows/code-lint.yml similarity index 70% rename from .github/workflows/js-lint.yml rename to .github/workflows/code-lint.yml index dee45b54dc..4cc25120b4 100644 --- a/.github/workflows/js-lint.yml +++ b/.github/workflows/code-lint.yml @@ -1,9 +1,12 @@ -name: Lint JS +name: Lint code -# **What it does**: Lints our JavaScript to ensure the code matches the specified code style. -# **Why we have it**: We want some level of consistency to our JavaScript. +# **What it does**: Lints our code to ensure the code matches the specified code style. +# **Why we have it**: We want some level of consistency to our code. # **Who does it impact**: Docs engineering, open-source engineering contributors. +permissions: + contents: read + on: workflow_dispatch: push: @@ -15,10 +18,13 @@ on: - '**.mjs' - '**.ts' - '**.tsx' + - '**.yaml' + - '**.yml' + - '**.scss' # In case something like eslint or tsc or prettier upgrades - 'package-lock.json' # Ultimately, for debugging this workflow itself - - .github/workflows/js-lint.yml + - .github/workflows/code-lint.yml jobs: lint: @@ -39,5 +45,8 @@ jobs: - name: Run linter run: npm run lint + - name: Run Prettier + run: npm run prettier-check + - name: Run TypeScript run: npm run tsc diff --git a/.github/workflows/create-translation-batch-pr.yml b/.github/workflows/create-translation-batch-pr.yml index dbf5e712e0..136dab77ec 100644 --- a/.github/workflows/create-translation-batch-pr.yml +++ b/.github/workflows/create-translation-batch-pr.yml @@ -16,6 +16,7 @@ on: jobs: create-translation-batch: name: Create translation batch + if: github.repository == 'github/docs-internal' runs-on: ubuntu-latest # A sync's average run time is ~3.2 hours. # This sets a maximum execution time of 300 minutes (5 hours) to prevent the workflow from running longer than necessary. diff --git a/.github/workflows/prod-build-deploy.yml b/.github/workflows/prod-build-deploy.yml index bd41c18a56..349f32ae05 100644 --- a/.github/workflows/prod-build-deploy.yml +++ b/.github/workflows/prod-build-deploy.yml @@ -178,7 +178,7 @@ jobs: env: FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }} FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }} - FASTLY_SURROGATE_KEY: 'all-the-things' + FASTLY_SURROGATE_KEY: 'every-deployment' run: .github/actions-scripts/purge-fastly-edge-cache.js - name: Send Slack notification if workflow failed diff --git a/.prettierignore b/.prettierignore index a6304997cf..4a66ca51fc 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ translations/ -includes/ \ No newline at end of file +includes/ +data/release-notes/ diff --git a/assets/images/help/enterprises/audit-stream-bucket-google-cloud-storage.png b/assets/images/help/enterprises/audit-stream-bucket-google-cloud-storage.png new file mode 100644 index 0000000000..b3cbe670ec Binary files /dev/null and b/assets/images/help/enterprises/audit-stream-bucket-google-cloud-storage.png differ diff --git a/assets/images/help/enterprises/audit-stream-check-endpoint-google-cloud-storage.png b/assets/images/help/enterprises/audit-stream-check-endpoint-google-cloud-storage.png new file mode 100644 index 0000000000..72988cc741 Binary files /dev/null and b/assets/images/help/enterprises/audit-stream-check-endpoint-google-cloud-storage.png differ diff --git a/assets/images/help/enterprises/audit-stream-choice-google-cloud-storage.png b/assets/images/help/enterprises/audit-stream-choice-google-cloud-storage.png new file mode 100644 index 0000000000..1c087cce3e Binary files /dev/null and b/assets/images/help/enterprises/audit-stream-choice-google-cloud-storage.png differ diff --git a/assets/images/help/enterprises/audit-stream-json-credentials-google-cloud-storage.png b/assets/images/help/enterprises/audit-stream-json-credentials-google-cloud-storage.png new file mode 100644 index 0000000000..182385a8be Binary files /dev/null and b/assets/images/help/enterprises/audit-stream-json-credentials-google-cloud-storage.png differ diff --git a/assets/images/help/saml/okta-ae-add-application.png b/assets/images/help/saml/okta-ae-add-application.png new file mode 100644 index 0000000000..a12d20ec64 Binary files /dev/null and b/assets/images/help/saml/okta-ae-add-application.png differ diff --git a/assets/images/help/saml/okta-ae-add-github-ae.png b/assets/images/help/saml/okta-ae-add-github-ae.png new file mode 100644 index 0000000000..78f8f9f92a Binary files /dev/null and b/assets/images/help/saml/okta-ae-add-github-ae.png differ diff --git a/assets/images/help/saml/okta-ae-assign-group-to-app.png b/assets/images/help/saml/okta-ae-assign-group-to-app.png new file mode 100644 index 0000000000..aa4aa2aee4 Binary files /dev/null and b/assets/images/help/saml/okta-ae-assign-group-to-app.png differ diff --git a/assets/images/help/saml/okta-ae-assign-role.png b/assets/images/help/saml/okta-ae-assign-role.png new file mode 100644 index 0000000000..01d9ab73bb Binary files /dev/null and b/assets/images/help/saml/okta-ae-assign-role.png differ diff --git a/assets/images/help/saml/okta-ae-assign-to-people.png b/assets/images/help/saml/okta-ae-assign-to-people.png new file mode 100644 index 0000000000..b29b44a7e5 Binary files /dev/null and b/assets/images/help/saml/okta-ae-assign-to-people.png differ diff --git a/assets/images/help/saml/okta-ae-assign-user.png b/assets/images/help/saml/okta-ae-assign-user.png new file mode 100644 index 0000000000..384e4a1f94 Binary files /dev/null and b/assets/images/help/saml/okta-ae-assign-user.png differ diff --git a/assets/images/help/saml/okta-ae-assignments-tab.png b/assets/images/help/saml/okta-ae-assignments-tab.png new file mode 100644 index 0000000000..7b22cdc297 Binary files /dev/null and b/assets/images/help/saml/okta-ae-assignments-tab.png differ diff --git a/assets/images/help/saml/okta-ae-browse-app-catalog.png b/assets/images/help/saml/okta-ae-browse-app-catalog.png new file mode 100644 index 0000000000..ce0216432c Binary files /dev/null and b/assets/images/help/saml/okta-ae-browse-app-catalog.png differ diff --git a/assets/images/help/saml/okta-ae-configure-app.png b/assets/images/help/saml/okta-ae-configure-app.png new file mode 100644 index 0000000000..33f8336bf0 Binary files /dev/null and b/assets/images/help/saml/okta-ae-configure-app.png differ diff --git a/assets/images/help/saml/okta-ae-configure-base-url.png b/assets/images/help/saml/okta-ae-configure-base-url.png new file mode 100644 index 0000000000..c8fd4a60b1 Binary files /dev/null and b/assets/images/help/saml/okta-ae-configure-base-url.png differ diff --git a/assets/images/help/saml/okta-ae-enable-api-integration.png b/assets/images/help/saml/okta-ae-enable-api-integration.png new file mode 100644 index 0000000000..608d14ad76 Binary files /dev/null and b/assets/images/help/saml/okta-ae-enable-api-integration.png differ diff --git a/assets/images/help/saml/okta-ae-group-add-app.png b/assets/images/help/saml/okta-ae-group-add-app.png new file mode 100644 index 0000000000..57d1efa279 Binary files /dev/null and b/assets/images/help/saml/okta-ae-group-add-app.png differ diff --git a/assets/images/help/saml/okta-ae-provisioning-tab.png b/assets/images/help/saml/okta-ae-provisioning-tab.png new file mode 100644 index 0000000000..32d53f718d Binary files /dev/null and b/assets/images/help/saml/okta-ae-provisioning-tab.png differ diff --git a/assets/images/help/saml/okta-ae-push-groups-add.png b/assets/images/help/saml/okta-ae-push-groups-add.png new file mode 100644 index 0000000000..fd8b94222c Binary files /dev/null and b/assets/images/help/saml/okta-ae-push-groups-add.png differ diff --git a/assets/images/help/saml/okta-ae-push-groups-by-name.png b/assets/images/help/saml/okta-ae-push-groups-by-name.png new file mode 100644 index 0000000000..be1988936f Binary files /dev/null and b/assets/images/help/saml/okta-ae-push-groups-by-name.png differ diff --git a/assets/images/help/saml/okta-ae-push-groups-tab.png b/assets/images/help/saml/okta-ae-push-groups-tab.png new file mode 100644 index 0000000000..6c151d5a49 Binary files /dev/null and b/assets/images/help/saml/okta-ae-push-groups-tab.png differ diff --git a/assets/images/help/saml/okta-ae-search.png b/assets/images/help/saml/okta-ae-search.png new file mode 100644 index 0000000000..b357a1d55c Binary files /dev/null and b/assets/images/help/saml/okta-ae-search.png differ diff --git a/assets/images/help/saml/okta-ae-sign-on-tab.png b/assets/images/help/saml/okta-ae-sign-on-tab.png new file mode 100644 index 0000000000..55c823fcd2 Binary files /dev/null and b/assets/images/help/saml/okta-ae-sign-on-tab.png differ diff --git a/assets/images/help/saml/okta-ae-site-admin-external-groups.png b/assets/images/help/saml/okta-ae-site-admin-external-groups.png new file mode 100644 index 0000000000..a61d3e2e22 Binary files /dev/null and b/assets/images/help/saml/okta-ae-site-admin-external-groups.png differ diff --git a/assets/images/help/saml/okta-ae-site-admin-group-details.png b/assets/images/help/saml/okta-ae-site-admin-group-details.png new file mode 100644 index 0000000000..cc2937cc8f Binary files /dev/null and b/assets/images/help/saml/okta-ae-site-admin-group-details.png differ diff --git a/assets/images/help/saml/okta-ae-site-admin-list-groups.png b/assets/images/help/saml/okta-ae-site-admin-list-groups.png new file mode 100644 index 0000000000..43ea403efb Binary files /dev/null and b/assets/images/help/saml/okta-ae-site-admin-list-groups.png differ diff --git a/assets/images/help/saml/okta-ae-to-app-settings.png b/assets/images/help/saml/okta-ae-to-app-settings.png new file mode 100644 index 0000000000..5bdb5ed228 Binary files /dev/null and b/assets/images/help/saml/okta-ae-to-app-settings.png differ diff --git a/assets/images/help/saml/okta-ae-view-setup-instructions.png b/assets/images/help/saml/okta-ae-view-setup-instructions.png new file mode 100644 index 0000000000..45889d2716 Binary files /dev/null and b/assets/images/help/saml/okta-ae-view-setup-instructions.png differ diff --git a/components/guides/ArticleCards.tsx b/components/guides/ArticleCards.tsx index 0d655f95f5..461b2a7610 100644 --- a/components/guides/ArticleCards.tsx +++ b/components/guides/ArticleCards.tsx @@ -1,9 +1,6 @@ import React, { useEffect, useState } from 'react' -import { - ArticleGuide, - useProductGuidesContext, -} from 'components/context/ProductGuidesContext' +import { ArticleGuide, useProductGuidesContext } from 'components/context/ProductGuidesContext' import { useTranslation } from 'components/hooks/useTranslation' import { ArticleCard } from './ArticleCard' import { DropdownMenu } from '@primer/components' @@ -35,20 +32,16 @@ export const ArticleCards = () => { const guides = isUserFiltering ? filteredResults : includeGuides || [] const types = Object.entries(guideTypes).map(([key, val]) => { - return ( - {text: val, key: key} - ) - }) as ItemInput[] - - types.unshift({text: t('filters.all'), key: undefined}) - - const topics = allTopics?.map((topic) => { - return ( - {text: topic, key: topic} - ) + return { text: val, key: key } }) as ItemInput[] - topics.unshift({text: t('filters.all'), key: undefined}) + types.unshift({ text: t('filters.all'), key: undefined }) + + const topics = allTopics?.map((topic) => { + return { text: topic, key: topic } + }) as ItemInput[] + + topics.unshift({ text: t('filters.all'), key: undefined }) return (
@@ -58,26 +51,28 @@ export const ArticleCards = () => { - +
- +
diff --git a/components/landing/ArticleList.tsx b/components/landing/ArticleList.tsx index a524c2e9fe..916d4645bc 100644 --- a/components/landing/ArticleList.tsx +++ b/components/landing/ArticleList.tsx @@ -70,7 +70,7 @@ export const ArticleList = ({ title, viewAllHref, articles }: ArticleListPropsT) {link.date && ( diff --git a/components/landing/CodeExampleCard.tsx b/components/landing/CodeExampleCard.tsx index d80aa495df..b1f5b431ea 100644 --- a/components/landing/CodeExampleCard.tsx +++ b/components/landing/CodeExampleCard.tsx @@ -30,7 +30,7 @@ export const CodeExampleCard = ({ example }: Props) => {