Skip to content

Commit

Permalink
Merge pull request github#28345 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Sep 19, 2023
2 parents 4434642 + 3f94bb2 commit 122c673
Show file tree
Hide file tree
Showing 152 changed files with 235 additions and 327 deletions.
6 changes: 3 additions & 3 deletions .github/actions-scripts/content-changes-table-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import core from '@actions/core'

import { getContents } from '../../script/helpers/git-utils.js'
import parse from '../../lib/read-frontmatter.js'
import getApplicableVersions from '../../lib/get-applicable-versions.js'
import nonEnterpriseDefaultVersion from '../../lib/non-enterprise-default-version.js'
import { allVersionShortnames } from '../../lib/all-versions.js'
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
import { allVersionShortnames } from '#src/versions/lib/all-versions.js'
import { waitUntilUrlIsHealthy } from './lib/wait-until-url-is-healthy.js'

const { GITHUB_TOKEN, APP_URL } = process.env
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/open-enterprise-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ jobs:
- name: Create an enterprise release issue
if: steps.existingIssue.outputs.releaseIssue == 'false'
run: |
.github/actions-scripts/create-enterprise-issue.js release
src/versions/scripts/create-enterprise-issue.js release
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}

- name: Create an enterprise deprecation issue
if: steps.existingIssue.outputs.deprecationIssue == 'false'
run: |
.github/actions-scripts/create-enterprise-issue.js deprecation
src/versions/scripts/create-enterprise-issue.js deprecation
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
2 changes: 1 addition & 1 deletion components/DefaultLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Header } from 'components/page-header/Header'
import { LegalFooter } from 'components/page-footer/LegalFooter'
import { ScrollButton } from 'components/ui/ScrollButton'
import { SupportSection } from 'components/page-footer/SupportSection'
import { DeprecationBanner } from 'components/page-header/DeprecationBanner'
import { DeprecationBanner } from 'src/versions/components/DeprecationBanner'
import { RestBanner } from 'src/rest/components/RestBanner'
import { useMainContext } from 'components/context/MainContext'
import { useTranslation } from 'src/languages/components/useTranslation'
Expand Down
2 changes: 1 addition & 1 deletion components/page-footer/SupportSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Survey } from 'src/events/components/Survey'
import { Contribution } from 'components/page-footer/Contribution'
import { Support } from 'components/page-footer/Support'
import { useMainContext } from 'components/context/MainContext'
import { useVersion } from 'components/hooks/useVersion'
import { useVersion } from 'src/versions/components/useVersion'
import { useRouter } from 'next/router'
import { useTranslation } from 'src/languages/components/useTranslation'

Expand Down
4 changes: 2 additions & 2 deletions components/page-header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
XIcon,
} from '@primer/octicons-react'

import { DEFAULT_VERSION, useVersion } from 'components/hooks/useVersion'
import { DEFAULT_VERSION, useVersion } from 'src/versions/components/useVersion'
import { Link } from 'components/Link'
import { useMainContext } from 'components/context/MainContext'
import { useHasAccount } from 'components/hooks/useHasAccount'
Expand All @@ -21,7 +21,7 @@ import { ApiVersionPicker } from 'src/rest/components/ApiVersionPicker'
import { useTranslation } from 'src/languages/components/useTranslation'
import { Search } from 'src/search/components/Search'
import { Breadcrumbs } from 'components/page-header/Breadcrumbs'
import { VersionPicker } from 'components/page-header/VersionPicker'
import { VersionPicker } from 'src/versions/components/VersionPicker'
import { SidebarNav } from 'components/sidebar/SidebarNav'
import { AllProductsLink } from 'components/sidebar/AllProductsLink'

Expand Down
2 changes: 1 addition & 1 deletion components/page-header/HeaderNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useLanguages } from 'src/languages/components/LanguagesContext'
import { useMainContext } from 'components/context/MainContext'
import { useTranslation } from 'src/languages/components/useTranslation'
import { ExcludesNull } from 'components/lib/ExcludesNull'
import { useVersion } from 'components/hooks/useVersion'
import { useVersion } from 'src/versions/components/useVersion'
import { useUserLanguage } from 'src/languages/components/useUserLanguage'
import styles from './HeaderNotifications.module.scss'

Expand Down
2 changes: 1 addition & 1 deletion components/sidebar/AllProductsLink.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRouter } from 'next/router'
import { ArrowLeftIcon } from '@primer/octicons-react'
import { DEFAULT_VERSION, useVersion } from 'components/hooks/useVersion'
import { DEFAULT_VERSION, useVersion } from 'src/versions/components/useVersion'
import { Link } from 'components/Link'

export const AllProductsLink = () => {
Expand Down
2 changes: 1 addition & 1 deletion content/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ See [`lib/frontmatter.js`](../lib/frontmatter.js).

### `versions`

- Purpose: Indicates the [versions](../lib/all-versions.js) to which a page applies.
- Purpose: Indicates the [versions](#src/versions/lib/all-versions.js) to which a page applies.
See [Versioning](#versioning) for more info.
- Type: `Object`. Allowable keys map to product names and can be found in the `versions` object in [`lib/frontmatter.js`](../lib/frontmatter.js).
- This frontmatter value is currently **required** for all pages.
Expand Down
4 changes: 2 additions & 2 deletions lib/all-products.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from 'fs/promises'
import path from 'path'
import frontmatter from './read-frontmatter.js'
import getApplicableVersions from './get-applicable-versions.js'
import removeFPTFromPath from './remove-fpt-from-path.js'
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'
import removeFPTFromPath from '#src/versions/lib/remove-fpt-from-path.js'
import { ROOT } from './constants.js'

// Both internal and external products are specified in content/index.md
Expand Down
2 changes: 1 addition & 1 deletion lib/frontmatter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import parse from './read-frontmatter.js'
import { allVersions } from './all-versions.js'
import { allVersions } from '#src/versions/lib/all-versions.js'
import { allTools } from '#src/tools/lib/all-tools.js'
import { getDeepDataByLanguage } from './get-data.js'

Expand Down
2 changes: 1 addition & 1 deletion lib/get-product-groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'path'

import { productMap, data } from './all-products.js'
import { renderContentWithFallback } from './render-with-fallback.js'
import removeFPTFromPath from './remove-fpt-from-path.js'
import removeFPTFromPath from '#src/versions/lib/remove-fpt-from-path.js'

async function getPage(id, lang, pageMap, context) {
const productId = id.split('/')[0]
Expand Down
4 changes: 2 additions & 2 deletions lib/page-data.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import path from 'path'

import languages from '#src/languages/lib/languages.js'
import { allVersions } from './all-versions.js'
import { allVersions } from '#src/versions/lib/all-versions.js'
import createTree from './create-tree.js'
import nonEnterpriseDefaultVersion from './non-enterprise-default-version.js'
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
import readFileContents from './read-file-contents.js'
import Page from './page.js'
import frontmatterSchema from './frontmatter.js'
Expand Down
4 changes: 2 additions & 2 deletions lib/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import assert from 'assert'
import path from 'path'
import cheerio from 'cheerio'
import patterns from './patterns.js'
import getApplicableVersions from './get-applicable-versions.js'
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'
import generateRedirectsForPermalinks from '#src/redirects/lib/permalinks.js'
import getEnglishHeadings from './get-english-headings.js'
import getTocItems from './get-toc-items.js'
Expand All @@ -19,7 +19,7 @@ import getDocumentType from '#src/events/lib/get-document-type.js'
import { union } from 'lodash-es'
import { allTools } from '#src/tools/lib/all-tools.js'
import { renderContentWithFallback } from './render-with-fallback.js'
import { deprecated, supported } from './enterprise-server-releases.js'
import { deprecated, supported } from '#src/versions/lib/enterprise-server-releases.js'

// We're going to check a lot of pages' "ID" (the first part of
// the relativePath) against `productMap` to make sure it's valid.
Expand Down
6 changes: 3 additions & 3 deletions lib/path-utils.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import slash from 'slash'
import path from 'path'
import patterns from './patterns.js'
import { latest } from './enterprise-server-releases.js'
import { latest } from '#src/versions/lib/enterprise-server-releases.js'
import { productIds } from './all-products.js'
import { allVersions } from './all-versions.js'
import nonEnterpriseDefaultVersion from './non-enterprise-default-version.js'
import { allVersions } from '#src/versions/lib/all-versions.js'
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
const supportedVersions = new Set(Object.keys(allVersions))

// Add the language to the given HREF
Expand Down
2 changes: 1 addition & 1 deletion lib/permalink.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assert from 'assert'
import path from 'path'
import patterns from './patterns.js'
import removeFPTFromPath from './remove-fpt-from-path.js'
import removeFPTFromPath from '#src/versions/lib/remove-fpt-from-path.js'

/*
This class creates the "permalinks" that power a page's different versions,
Expand Down
2 changes: 1 addition & 1 deletion lib/product-names.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import enterpriseServerReleases from '../lib/enterprise-server-releases.js'
import enterpriseServerReleases from '#src/versions/lib/enterprise-server-releases.js'

const productNames = {
dotcom: 'GitHub.com',
Expand Down
2 changes: 1 addition & 1 deletion middleware/block-robots.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { productMap } from '../lib/all-products.js'
import { deprecated } from '../lib/enterprise-server-releases.js'
import { deprecated } from '#src/versions/lib/enterprise-server-releases.js'

const pathRegExps = [
// Disallow indexing of WIP products
Expand Down
6 changes: 3 additions & 3 deletions middleware/context.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import languages from '#src/languages/lib/languages.js'
import enterpriseServerReleases from '../lib/enterprise-server-releases.js'
import { allVersions } from '../lib/all-versions.js'
import enterpriseServerReleases from '#src/versions/lib/enterprise-server-releases.js'
import { allVersions } from '#src/versions/lib/all-versions.js'
import { productMap } from '../lib/all-products.js'
import {
getVersionStringFromPath,
Expand All @@ -12,7 +12,7 @@ import {
import productNames from '../lib/product-names.js'
import warmServer from '../lib/warm-server.js'
import searchVersions from '../src/search/lib/versions.js'
import nonEnterpriseDefaultVersion from '../lib/non-enterprise-default-version.js'
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
import { getDataByLanguage, getUIDataMerged } from '../lib/get-data.js'

// This doesn't change just because the request changes, so compute it once.
Expand Down
2 changes: 1 addition & 1 deletion middleware/contextualizers/current-product-tree.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path'
import { liquid } from '#src/content-render/index.js'
import findPageInSiteTree from '../../lib/find-page-in-site-tree.js'
import removeFPTFromPath from '../../lib/remove-fpt-from-path.js'
import removeFPTFromPath from '#src/versions/lib/remove-fpt-from-path.js'
import { executeWithFallback } from '../../lib/render-with-fallback.js'

// This module adds currentProductTree to the context object for use in layouts.
Expand Down
2 changes: 1 addition & 1 deletion middleware/contextualizers/product-groups.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getProductGroups } from '../../lib/get-product-groups.js'
import warmServer from '../../lib/warm-server.js'
import { languageKeys } from '#src/languages/lib/languages.js'
import { allVersionKeys } from '../../lib/all-versions.js'
import { allVersionKeys } from '#src/versions/lib/all-versions.js'

const isHomepage = (path) => {
const split = path.split('/')
Expand Down
2 changes: 1 addition & 1 deletion middleware/contextualizers/whats-new-changelog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getChangelogItems } from '../../lib/changelog.js'
import getApplicableVersions from '../../lib/get-applicable-versions.js'
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'

export default async function whatsNewChangelog(req, res, next) {
if (!req.context.page) return next()
Expand Down
4 changes: 2 additions & 2 deletions middleware/helmet.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import helmet from 'helmet'
import { cloneDeep } from 'lodash-es'
import isArchivedVersion from '../lib/is-archived-version.js'
import versionSatisfiesRange from '../lib/version-satisfies-range.js'
import isArchivedVersion from '#src/archives/lib/is-archived-version.js'
import versionSatisfiesRange from '#src/versions/lib/version-satisfies-range.js'

const isDev = process.env.NODE_ENV === 'development'
const AZURE_STORAGE_URL = 'githubdocs.azureedge.net'
Expand Down
10 changes: 5 additions & 5 deletions middleware/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ import handleNextDataPath from './handle-next-data-path.js'
import detectLanguage from '#src/languages/middleware/detect-language.js'
import reloadTree from './reload-tree.js'
import context from './context.js'
import shortVersions from './contextualizers/short-versions.js'
import shortVersions from '#src/versions/middleware/short-versions.js'
import languageCodeRedirects from '#src/redirects/middleware/language-code-redirects.js'
import handleRedirects from '#src/redirects/middleware/handle-redirects.js'
import findPage from './find-page.js'
import blockRobots from './block-robots.js'
import archivedEnterpriseVersionsAssets from './archived-enterprise-versions-assets.js'
import archivedEnterpriseVersionsAssets from '#src/archives/middleware/archived-enterprise-versions-assets.js'
import api from './api/index.js'
import healthz from './healthz.js'
import productIcons from './product-icons.js'
import manifestJson from './manifest-json.js'
import remoteIP from './remote-ip.js'
import buildInfo from './build-info.js'
import archivedEnterpriseVersions from './archived-enterprise-versions.js'
import archivedEnterpriseVersions from '#src/archives/middleware/archived-enterprise-versions.js'
import robots from './robots.js'
import earlyAccessLinks from '#src/early-access/middleware/early-access-links.js'
import categoriesForSupport from './categories-for-support.js'
Expand All @@ -46,15 +46,15 @@ import currentProductTree from './contextualizers/current-product-tree.js'
import genericToc from './contextualizers/generic-toc.js'
import breadcrumbs from './contextualizers/breadcrumbs.js'
import glossaries from './contextualizers/glossaries.js'
import features from './contextualizers/features.js'
import features from '#src/versions/middleware/features.js'
import productExamples from './contextualizers/product-examples.js'
import productGroups from './contextualizers/product-groups.js'
import featuredLinks from '#src/landings/middleware/featured-links.js'
import learningTrack from '#src/learning-track/middleware/learning-track.js'
import next from './next.js'
import renderPage from './render-page.js'
import assetPreprocessing from '#src/assets/middleware/asset-preprocessing.js'
import archivedAssetRedirects from './archived-asset-redirects.js'
import archivedAssetRedirects from '#src/archives/middleware/archived-asset-redirects.js'
import favicons from './favicons.js'
import setStaticAssetCaching from '#src/assets/middleware/static-asset-caching.js'
import fastHead from './fast-head.js'
Expand Down
2 changes: 1 addition & 1 deletion middleware/render-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import getMiniTocItems from '../lib/get-mini-toc-items.js'
import Page from '../lib/page.js'
import { pathLanguagePrefixed } from '#src/languages/lib/languages.js'
import statsd from '#src/observability/lib/statsd.js'
import { allVersions } from '../lib/all-versions.js'
import { allVersions } from '#src/versions/lib/all-versions.js'
import { isConnectionDropped } from './halt-on-dropped-connection.js'
import { nextApp, nextHandleRequest } from './next.js'
import { defaultCacheControl } from './cache-control.js'
Expand Down
90 changes: 0 additions & 90 deletions script/content-migrations/add-ghec-to-schema.js

This file was deleted.

Loading

0 comments on commit 122c673

Please sign in to comment.