1
0
mirror of synced 2026-01-17 12:01:24 -05:00

Merge pull request #31762 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-02-21 12:58:10 -08:00
committed by GitHub
16 changed files with 10 additions and 50144 deletions

View File

@@ -9,7 +9,7 @@ on:
workflow_dispatch:
inputs:
version:
description: "Version to exclusively generate the search index for. E.g. 'dotcom', 'ghes-3.7', 'ghae'"
description: "Version to exclusively generate the search index for. E.g. 'dotcom', 'ghes-3.12'"
required: false
default: ''
languages:

File diff suppressed because it is too large Load Diff

View File

@@ -63,7 +63,6 @@
"test-local-dev": "node src/workflows/test-local-dev.js",
"test-moved-content": "tsx src/content-render/scripts/test-moved-content.ts",
"test-watch": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch --notify --notifyMode=change --coverage",
"toggle-ghae-feature-flags": "node src/versions/scripts/toggle-ghae-feature-flags.js",
"tsc": "tsc --noEmit",
"unallowed-contributions": "node src/workflows/unallowed-contributions.js",
"update-data-and-image-paths": "node src/early-access/scripts/update-data-and-image-paths.js",

View File

@@ -39,11 +39,6 @@ export function getAuditLogEvents(page, version, categorized = false) {
openApiVersion = openApiVersion.split('-')[0]
}
// There's no ghae versioned audit log events
if (openApiVersion === 'ghae') {
openApiVersion = 'ghes'
}
const auditLogFileName = path.join(AUDIT_LOG_DATA_DIR, openApiVersion, `${page}.json`)
// If the data isn't cached for an entire version or a particular page, read

View File

@@ -157,7 +157,6 @@ function validateIfversionConditionals(cond, possibleVersionNames) {
// allows us to deprecate the version before removing
// the old liquid content.
if (
version !== 'ghae' &&
!(
supported.includes(release) ||
release === next ||

View File

@@ -4,7 +4,6 @@ descriptions: Early Access secret
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
---

View File

@@ -1,12 +1,11 @@
---
title: early-access secret
descriptions: Early-Access early-Access secret
redirect_from:
redirect_from:
- /early-access/secret
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
---

View File

@@ -6,10 +6,9 @@ versions:
fpt: '*'
ghec: '*'
ghes: '*'
ghae: '*'
topics:
- Transcripts
children:
- transcript-codespaces-your-instant-dev-box-in-the-cloud
- transcript-using-projects-for-feature-planning
---
---

View File

@@ -14,8 +14,8 @@ describe(earlyAccessReferences.names.join(' - '), () => {
const errors = result[FIXTURE_FILEPATH_NON_EA]
expect(errors.length).toBe(8)
const lineNumbers = errors.map((error) => error.lineNumber)
expect(lineNumbers.includes(13)).toBe(true)
expect(lineNumbers.includes(14)).toBe(false)
expect(lineNumbers.includes(12)).toBe(true)
expect(lineNumbers.includes(13)).toBe(false)
expect(errors[0].errorRange).toEqual([1, 12])
})
test('early access file with early access references passes', async () => {

View File

@@ -12,8 +12,7 @@ const versionsProps = Object.assign({}, schema.properties.versions)
// "versions": {
// "fpt": "*",
// "ghec": "*",
// "ghes": "*",
// "ghae": "<3.4"
// "ghes": "*"
// },
// "isPublic": true,
// "isPrivateWithGhas": true,

View File

@@ -315,7 +315,6 @@ describe('Page class', () => {
})
expect(page.versions.fpt).toBe('*')
expect(page.versions.ghes).toBe('>3.0')
expect(page.versions.ghae).toBeUndefined()
expect(page.applicableVersions.includes('free-pro-team@latest')).toBe(true)
expect(page.applicableVersions.includes(`enterprise-server@${latest}`)).toBe(true)
})
@@ -352,7 +351,6 @@ describe('Page class', () => {
//
// versions:
// ghes: '<3.0'
// ghae: '*'
//
// So we expect to get the versioning from both.
const page = await Page.init({

View File

@@ -326,7 +326,6 @@ describe('static routes', () => {
)
).statusCode,
).toBe(200)
expect((await get('/public/ghae/schema.docs-ghae.graphql')).statusCode).toBe(200)
})
test('does not serve repo contents that live outside the /assets directory', async () => {

View File

@@ -10,7 +10,7 @@ export default function getVersionBlocks(rawBlocks) {
const condOnly = block.conditional.replace(/{%-? /, '').replace(/ -?%}/, '')
const condWithLiquid = block.conditional
// E.g., [ 'ghes', 'ghes < 2.21', 'ghae' ]
// E.g., [ 'ghes', 'ghes < 2.21' ]
const condArgs = condOnly
.replace('ifversion ', '')
.replace('elsif ', '')

View File

@@ -3,10 +3,8 @@ import { Tokenizer } from 'liquidjs'
import { getLiquidConditionalsWithContent } from './get-liquid-conditionals.js'
import getVersionBlocks from './get-version-blocks.js'
import { allVersions } from '#src/versions/lib/all-versions.js'
import supportedOperators from '#src/content-render/liquid/ifversion-supported-operators.js'
const supportedShortVersions = Object.values(allVersions).map((v) => v.shortName)
const ghaeRangeRegex = new RegExp(`ghae (${supportedOperators.join('|')})`)
const updateRangeKeepGhes = 'updateRangeKeepGhes'
const updateRangeRemoveGhes = 'updateRangeRemoveGhes'
const removeRangeAndContent = 'removeRangeAndContent'
@@ -266,7 +264,5 @@ function lastIndexOfRegex(str, regex, fromIndex) {
function canConditionalBeRemoved(supportedVersions, conditional) {
if (typeof conditional !== 'string') throw new Error('Expecting a string.')
const containsAllVersions = supportedVersions.every((arg) => conditional.includes(arg))
const hasGhaeRange = ghaeRangeRegex.test(conditional)
return containsAllVersions && !hasGhaeRange
return supportedVersions.every((arg) => conditional.includes(arg))
}

View File

@@ -58,17 +58,7 @@ function getApplicableVersions(versionsObj, filepath, opts = {}) {
const foundStandardVersions = evaluateVersions(versionsObj)
// Combine them!
let applicableVersions = Array.from(new Set(foundStandardVersions.concat(foundFeatureVersions)))
// GHAE is still around but can optionally be excluded.
// The reason is that we don't yet (early 2024) entirely delete it,
// but we don't want to encourage it either. The version is deprecated
// but we're not yet ready to remove it from all-versions.js.
if (opts.excludeGHAE) {
applicableVersions = applicableVersions.filter(
(applicableVersion) => !applicableVersion.startsWith('github-ae@'),
)
}
const applicableVersions = Array.from(new Set(foundStandardVersions.concat(foundFeatureVersions)))
if (!applicableVersions.length && !opts.doNotThrow) {
throw new Error(

View File

@@ -108,13 +108,7 @@ async function main(owner, repo, baseSHA, headSHA) {
// the try/catch is needed because getApplicableVersions() returns either [] or throws an error when it can't parse the versions frontmatter
// try/catch can be removed if docs-engineering#1821 is resolved
// i.e. for feature based versioning, like ghae: 'issue-6337'
const fileVersions = getApplicableVersions(data.versions, undefined, {
// Here we explictly "opt-out" of GHAE versions. We're confident,
// at this point, that we don't want github-ae to appear in the
// content changes table, but we're not yet ready to entirely
// delete it from all code. The deprecation is careful.
excludeGHAE: true,
})
const fileVersions = getApplicableVersions(data.versions)
for (const plan in allVersionShortnames) {
// plan is the shortName (i.e., fpt)