From fca9c6cd63fd9b0d27611671318282e1f27cad1b Mon Sep 17 00:00:00 2001 From: docs-bot <77750099+docs-bot@users.noreply.github.com> Date: Mon, 23 Jun 2025 12:25:04 -0700 Subject: [PATCH 1/5] Sync secret scanning data (#56227) Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com> --- src/secret-scanning/data/public-docs.yml | 10 +++++----- src/secret-scanning/lib/config.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/secret-scanning/data/public-docs.yml b/src/secret-scanning/data/public-docs.yml index fd04bcc3894d..1e02c54c16b4 100644 --- a/src/secret-scanning/data/public-docs.yml +++ b/src/secret-scanning/data/public-docs.yml @@ -1351,7 +1351,7 @@ isPublic: true isPrivateWithGhas: true hasPushProtection: false - hasValidityCheck: '{% ifversion fpt or ghes %}false{% else %}true{% endif %}' + hasValidityCheck: false isduplicate: false - provider: Dropbox supportedSecret: Dropbox Short-Lived Access Token @@ -3531,7 +3531,7 @@ isPublic: false isPrivateWithGhas: true hasPushProtection: true - hasValidityCheck: '{% ifversion fpt or ghes %}false{% else %}true{% endif %}' + hasValidityCheck: false isduplicate: false - provider: Shippo supportedSecret: Shippo Test API Token @@ -3543,7 +3543,7 @@ isPublic: false isPrivateWithGhas: true hasPushProtection: false - hasValidityCheck: '{% ifversion fpt or ghes %}false{% else %}true{% endif %}' + hasValidityCheck: false isduplicate: false - provider: Shopee supportedSecret: Shopee Open Platform Partner Key @@ -3698,7 +3698,7 @@ isPublic: true isPrivateWithGhas: true hasPushProtection: false - hasValidityCheck: '{% ifversion fpt or ghes %}false{% else %}true{% endif %}' + hasValidityCheck: false isduplicate: true - provider: Slack supportedSecret: Slack API Token @@ -4224,7 +4224,7 @@ isPublic: true isPrivateWithGhas: true hasPushProtection: false - hasValidityCheck: '{% ifversion fpt or ghes %}false{% else %}true{% endif %}' + hasValidityCheck: false isduplicate: false - provider: Yandex supportedSecret: Yandex.Cloud API Key diff --git a/src/secret-scanning/lib/config.json b/src/secret-scanning/lib/config.json index f412793aa45c..01dd8ee40a7d 100644 --- a/src/secret-scanning/lib/config.json +++ b/src/secret-scanning/lib/config.json @@ -1,5 +1,5 @@ { - "sha": "4bc2c75484abeca92df68432bf1a735a34f04466", - "blob-sha": "8b8c921a94ef82f90298be6d4a7f963d48c2abcb", + "sha": "33706f4cc21d513d0337649024dc4e57dbe9f245", + "blob-sha": "40aebd4d6ddd62fa47833df008290cc39fb8c0a4", "targetFilename": "code-security/secret-scanning/introduction/supported-secret-scanning-patterns" } \ No newline at end of file From 6acf38668f42900e835f04ee9ade0d3a665e23d8 Mon Sep 17 00:00:00 2001 From: Kevin Heis Date: Mon, 23 Jun 2025 13:02:40 -0700 Subject: [PATCH 2/5] Fix release notes YAML test to properly render liquid variables (#56160) --- src/release-notes/tests/yaml.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/release-notes/tests/yaml.ts b/src/release-notes/tests/yaml.ts index 0831d2b86d5d..16b5fcd41936 100644 --- a/src/release-notes/tests/yaml.ts +++ b/src/release-notes/tests/yaml.ts @@ -6,6 +6,8 @@ import { beforeAll, describe, expect, test } from 'vitest' import yaml from 'js-yaml' import { liquid } from '@/content-render/index.js' +import { getDataByLanguage } from '@/data-directory/lib/get-data.js' +import { allVersions } from '@/versions/lib/all-versions.js' interface ReleaseNoteContent { intro: string @@ -34,7 +36,7 @@ describe('lint enterprise release notes', () => { yamlContent = yaml.load(fileContents) as ReleaseNoteContent }) - test('contains valid liquid', () => { + test('contains valid liquid', async () => { const { intro, sections } = yamlContent let toLint: Record = { intro } for (const key in sections) { @@ -54,9 +56,28 @@ describe('lint enterprise release notes', () => { }) } + // Create context with site data for rendering liquid variables + const context = { + currentLanguage: 'en', + currentVersionObj: allVersions['free-pro-team@latest'], + site: { + data: { + reusables: getDataByLanguage('reusables', 'en'), + variables: getDataByLanguage('variables', 'en'), + ui: getDataByLanguage('ui', 'en'), + }, + }, + } + for (const key in toLint) { if (!toLint[key]) continue + // First check if liquid parses correctly expect(() => liquid.parse(toLint[key]), `${key} contains invalid liquid`).not.toThrow() + // Then check if liquid renders correctly with context + await expect( + liquid.parseAndRender(toLint[key], context), + `${key} contains liquid that fails to render`, + ).resolves.not.toThrow() } }) From e759d379267ecd6e0da3673d42f68381d6d8585c Mon Sep 17 00:00:00 2001 From: Evan Bonsignori Date: Mon, 23 Jun 2025 13:20:07 -0700 Subject: [PATCH 3/5] show general search results in Copilot Search states (#56242) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/search/components/input/AskAIResults.tsx | 96 +++++++++---------- src/search/components/input/SearchOverlay.tsx | 77 +++++++-------- 2 files changed, 87 insertions(+), 86 deletions(-) diff --git a/src/search/components/input/AskAIResults.tsx b/src/search/components/input/AskAIResults.tsx index 7b135839de0f..4b1d6afc84fe 100644 --- a/src/search/components/input/AskAIResults.tsx +++ b/src/search/components/input/AskAIResults.tsx @@ -381,54 +381,6 @@ export function AskAIResults({ return (
- {!aiCouldNotAnswer && references && references.length > 0 ? ( - <> - - - - {t('search.ai.references')} - - {references - .map((source, index) => { - if (index >= MAX_REFERENCES_TO_SHOW) { - return null - } - const refIndex = index + referencesIndexOffset - return ( - { - referenceOnSelect(source.url) - }} - active={refIndex === selectedIndex} - ref={(element) => { - if (listElementsRef.current) { - listElementsRef.current[refIndex] = element - } - }} - > - - {source.title} - - ) - }) - .filter(Boolean)} - - - - ) : null}
) : null} + {!aiCouldNotAnswer && references && references.length > 0 ? ( + <> +