diff --git a/.github/workflows/reviewers-docs-engineering.yml b/.github/workflows/reviewers-docs-engineering.yml index 422139ef62d4..cb5e3527ea6f 100644 --- a/.github/workflows/reviewers-docs-engineering.yml +++ b/.github/workflows/reviewers-docs-engineering.yml @@ -54,11 +54,22 @@ jobs: # These are usually cross-platform `npm install` churn from contributors # editing content. We comment with reset instructions instead of pulling in # docs-engineering for review. + # + # Dependabot is exempt. Its security updates for transitive dependencies + # change only the lockfile, because the dependency is not in package.json. + # Those PRs are intentional, so the reset instructions are wrong and + # suppressing the review request leaves them with no reviewer at all. - name: Detect lockfile-only churn id: detect env: GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }} + PR_AUTHOR: ${{ github.event.pull_request.user.login }} run: | + if [ "$PR_AUTHOR" = "dependabot[bot]" ]; then + echo "Author is Dependabot; skipping lockfile churn detection." + echo "lockfile_only=false" >> "$GITHUB_OUTPUT" + exit 0 + fi changed=$(gh pr diff "$PR" --name-only) echo "Changed files:" echo "$changed" diff --git a/src/ghes-releases/lib/deprecation-steps.md b/src/ghes-releases/lib/deprecation-steps.md index 1a4f7606a65b..2adcea739a3e 100644 --- a/src/ghes-releases/lib/deprecation-steps.md +++ b/src/ghes-releases/lib/deprecation-steps.md @@ -1,9 +1,9 @@ --- -title: Enterprise Server {{ release-number }} deprecation steps +title: "[{{ deprecation-date }}] Enterprise Server {{ release-number }} deprecation steps" labels: - enterprise deprecation - - priority-1 - - time sensitive + - engineering + - priority-2 - workflow-generated --- diff --git a/src/ghes-releases/scripts/create-enterprise-issue.ts b/src/ghes-releases/scripts/create-enterprise-issue.ts index d6aeed121b1b..99a78b00d1e4 100644 --- a/src/ghes-releases/scripts/create-enterprise-issue.ts +++ b/src/ghes-releases/scripts/create-enterprise-issue.ts @@ -104,12 +104,14 @@ async function createDeprecationIssue() { const { data, content } = matter(issueTemplate) const { title, labels } = data const renderedContent = content.replaceAll('{{ release-number }}', oldestSupported) - const body = `GHES ${oldestSupported} deprecation occurs on ${deprecationDate}. + const body = `GHES ${oldestSupported} deprecation occurs on ${deprecationDate}. Don't start before that date. Late is fine. ${renderedContent}` await createIssue( repo, - title.replaceAll('{{ release-number }}', oldestSupported), + title + .replaceAll('{{ release-number }}', oldestSupported) + .replaceAll('{{ deprecation-date }}', deprecationDate), body, labels, oldestSupported, @@ -378,13 +380,14 @@ async function isExistingIssue( const issues = await octokit.request(`GET /search/issues?q=${query}`) if (titleMatch) { - for (const issue of issues.data.items) { - if (issue.title.includes(titleMatch)) { - console.log(`Issue ${issue.html_url} already exists for this release.`) - return true - } - return false + const match = issues.data.items.find((issue: { title: string }) => + issue.title.includes(titleMatch), + ) + if (match) { + console.log(`Issue ${match.html_url} already exists for this release.`) + return true } + return false } const issueExists = !!issues.data.items.length diff --git a/src/graphql/data/fpt/schema-repos.json b/src/graphql/data/fpt/schema-repos.json index ad0a9764dc63..a61678bc41b6 100644 --- a/src/graphql/data/fpt/schema-repos.json +++ b/src/graphql/data/fpt/schema-repos.json @@ -683,14 +683,14 @@ "fields": [ { "name": "alertsThreshold", - "description": "
The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" @@ -9990,14 +9990,14 @@ "inputFields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" diff --git a/src/graphql/data/ghec/schema-repos.json b/src/graphql/data/ghec/schema-repos.json index ad0a9764dc63..74470aee71f9 100644 --- a/src/graphql/data/ghec/schema-repos.json +++ b/src/graphql/data/ghec/schema-repos.json @@ -683,14 +683,14 @@ "fields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" @@ -9990,14 +9990,14 @@ "inputFields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" diff --git a/src/graphql/data/ghes-3.17/schema-repos.json b/src/graphql/data/ghes-3.17/schema-repos.json index 538637745abc..5f990c0a4686 100644 --- a/src/graphql/data/ghes-3.17/schema-repos.json +++ b/src/graphql/data/ghes-3.17/schema-repos.json @@ -411,14 +411,14 @@ "fields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" @@ -8408,14 +8408,14 @@ "inputFields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" diff --git a/src/graphql/data/ghes-3.18/schema-repos.json b/src/graphql/data/ghes-3.18/schema-repos.json index 36a30308cc46..e6f088208d0a 100644 --- a/src/graphql/data/ghes-3.18/schema-repos.json +++ b/src/graphql/data/ghes-3.18/schema-repos.json @@ -411,14 +411,14 @@ "fields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" @@ -8823,14 +8823,14 @@ "inputFields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" diff --git a/src/graphql/data/ghes-3.19/schema-repos.json b/src/graphql/data/ghes-3.19/schema-repos.json index 09efebdc0f8f..8a77c40a9d4a 100644 --- a/src/graphql/data/ghes-3.19/schema-repos.json +++ b/src/graphql/data/ghes-3.19/schema-repos.json @@ -411,14 +411,14 @@ "fields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" @@ -8843,14 +8843,14 @@ "inputFields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" diff --git a/src/graphql/data/ghes-3.20/schema-repos.json b/src/graphql/data/ghes-3.20/schema-repos.json index 38767d51314d..d1ab923420a4 100644 --- a/src/graphql/data/ghes-3.20/schema-repos.json +++ b/src/graphql/data/ghes-3.20/schema-repos.json @@ -566,14 +566,14 @@ "fields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" @@ -9362,14 +9362,14 @@ "inputFields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" diff --git a/src/graphql/data/ghes-3.21/schema-repos.json b/src/graphql/data/ghes-3.21/schema-repos.json index 7a6bf0ba4843..2002dedc47bc 100644 --- a/src/graphql/data/ghes-3.21/schema-repos.json +++ b/src/graphql/data/ghes-3.21/schema-repos.json @@ -566,14 +566,14 @@ "fields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" @@ -9409,14 +9409,14 @@ "inputFields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" diff --git a/src/graphql/data/ghes-3.22/schema-repos.json b/src/graphql/data/ghes-3.22/schema-repos.json index 6cd10f3fc5f8..31fb07a7c914 100644 --- a/src/graphql/data/ghes-3.22/schema-repos.json +++ b/src/graphql/data/ghes-3.22/schema-repos.json @@ -583,14 +583,14 @@ "fields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" @@ -9603,14 +9603,14 @@ "inputFields": [ { "name": "alertsThreshold", - "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise alerts block a\nreference update. For more information on alert severity levels, see \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" }, { "name": "securityAlertsThreshold", - "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", + "description": "The severity level at which code scanning results that raise security alerts\nblock a reference update. For more information on security severity levels,\nsee \"About code scanning alerts.\".
", "type": "String!", "id": "string", "href": "/graphql/reference/other#scalar-string" diff --git a/src/graphql/scripts/sync.ts b/src/graphql/scripts/sync.ts index e856ff33c5db..15fe3eb165e3 100755 --- a/src/graphql/scripts/sync.ts +++ b/src/graphql/scripts/sync.ts @@ -145,6 +145,7 @@ async function main() { latestSchema, previewsForSchema, fallbackCategoryMap, + { currentLanguage: 'en', currentVersion: version }, ) // This is slow! // Split the schema by category so the runtime can lazily load only the diff --git a/src/graphql/scripts/utils/process-schemas.ts b/src/graphql/scripts/utils/process-schemas.ts index 8e626e211c59..9004c9c81234 100755 --- a/src/graphql/scripts/utils/process-schemas.ts +++ b/src/graphql/scripts/utils/process-schemas.ts @@ -12,7 +12,8 @@ import type { DefinitionNode, TypeNode, } from 'graphql/language' -import helpers from './schema-helpers' +import baseHelpers, { createSchemaHelpers } from '@/graphql/scripts/utils/schema-helpers' +import type { Context } from '@/types/types' import { OTHER_CATEGORY, isValidCategory } from '@/graphql/lib/categories' import fs from 'fs/promises' import path from 'path' @@ -216,12 +217,14 @@ const externalScalarsJSON: Array<{ name: string; description: string }> = JSON.p ) const externalScalars: ScalarInfo[] = await Promise.all( externalScalarsJSON.map(async (scalar): Promise