diff --git a/src/frame/middleware/render-page.ts b/src/frame/middleware/render-page.ts index 2e7b9394515c..95866cc6ec90 100644 --- a/src/frame/middleware/render-page.ts +++ b/src/frame/middleware/render-page.ts @@ -5,7 +5,6 @@ import { get } from 'lodash-es' import getMiniTocItems from '@/frame/lib/get-mini-toc-items' import patterns from '@/frame/lib/patterns' -import { pathLanguagePrefixed } from '@/languages/lib/languages' import FailBot from '@/observability/lib/failbot' import statsd from '@/observability/lib/statsd' import type { ExtendedRequest } from '@/types' @@ -16,7 +15,6 @@ import { isConnectionDropped } from './halt-on-dropped-connection' import { nextHandleRequest } from './next' const STATSD_KEY_RENDER = 'middleware.render_page' -const STATSD_KEY_404 = 'middleware.render_404' async function buildRenderedPage(req: ExtendedRequest): Promise { const { context } = req @@ -69,33 +67,10 @@ export default async function renderPage(req: ExtendedRequest, res: Response) { ) } - if (!pathLanguagePrefixed(req.path)) { - defaultCacheControl(res) - return res.status(404).type('html').send(minimumNotFoundHtml) - } - - // For App Router migration: All language-prefixed 404s should use App Router - statsd.increment(STATSD_KEY_404, 1, [ - `url:${req.url}`, - `path:${req.path}`, - `referer:${req.headers.referer || ''}`, - ]) - + // send minimal 404 at this point since we ran into hydration issues trying to pass + // these along to AppRouter 404 handling defaultCacheControl(res) - - // Create a mock request that will be handled by App Router - const mockReq = Object.create(req) - mockReq.url = '/404' - mockReq.path = '/404' - mockReq.method = 'GET' - - // Only pass pathname - res.setHeader('x-pathname', req.path) - - // Import nextApp and handle directly - const { nextApp } = await import('./next') - res.status(404) - return nextApp.getRequestHandler()(mockReq, res) + return res.status(404).type('html').send(minimumNotFoundHtml) } // Just finish fast without all the details like Content-Length diff --git a/src/frame/tests/server.js b/src/frame/tests/server.js index 74102c741e50..4ae8e418ce5c 100644 --- a/src/frame/tests/server.js +++ b/src/frame/tests/server.js @@ -90,6 +90,11 @@ describe('server', () => { expect($.res.statusCode).toBe(404) }) + test('renders a 404 for language prefixed versioned non-existent pages', async () => { + const res = await get('/en/enterprise-cloud@latest/nonexistent-page') + expect(res.statusCode).toBe(404) + }) + // When using `got()` to send full end-to-end URLs, you can't use // URLs like in this test because got will // throw `RequestError: URI malformed`. diff --git a/src/graphql/data/fpt/changelog.json b/src/graphql/data/fpt/changelog.json index 2e1f4dd63c7d..8caed3124ba0 100644 --- a/src/graphql/data/fpt/changelog.json +++ b/src/graphql/data/fpt/changelog.json @@ -1,4 +1,18 @@ [ + { + "schemaChanges": [ + { + "title": "The GraphQL schema includes these changes:", + "changes": [ + "

Field viewerCanSetFields was added to object type Issue

", + "

Field viewerCanSeeIssueFields was added to object type Repository

" + ] + } + ], + "previewChanges": [], + "upcomingChanges": [], + "date": "2025-08-26" + }, { "schemaChanges": [ { diff --git a/src/graphql/data/fpt/schema.docs.graphql b/src/graphql/data/fpt/schema.docs.graphql index 0a20c21ba514..35383076d9e1 100644 --- a/src/graphql/data/fpt/schema.docs.graphql +++ b/src/graphql/data/fpt/schema.docs.graphql @@ -19546,6 +19546,11 @@ type Issue implements Assignable & Closable & Comment & Deletable & Labelable & """ viewerCanReopen: Boolean! + """ + Check if the current viewer can set fields on the issue. + """ + viewerCanSetFields: Boolean + """ Check if the viewer is able to change their subscription status for the repository. """ @@ -51312,6 +51317,11 @@ type Repository implements Node & PackageOwner & ProjectOwner & ProjectV2Recent reason: "Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. Removal on 2025-04-01 UTC." ) + """ + Indicates whether the current user can see issue fields in this repository + """ + viewerCanSeeIssueFields: Boolean! + """ Check if the viewer is able to change their subscription status for the repository. """ diff --git a/src/graphql/data/fpt/schema.json b/src/graphql/data/fpt/schema.json index 330b31b5e6fa..e419ae375c86 100644 --- a/src/graphql/data/fpt/schema.json +++ b/src/graphql/data/fpt/schema.json @@ -30735,6 +30735,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "viewerCanSetFields", + "description": "

Check if the current viewer can set fields on the issue.

", + "type": "Boolean", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "viewerCanSubscribe", "description": "

Check if the viewer is able to change their subscription status for the repository.

", @@ -67952,6 +67960,14 @@ "isDeprecated": true, "deprecationReason": "

Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. Removal on 2025-04-01 UTC.

" }, + { + "name": "viewerCanSeeIssueFields", + "description": "

Indicates whether the current user can see issue fields in this repository.

", + "type": "Boolean!", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "viewerCanSubscribe", "description": "

Check if the viewer is able to change their subscription status for the repository.

", diff --git a/src/graphql/data/ghec/schema.docs.graphql b/src/graphql/data/ghec/schema.docs.graphql index 0a20c21ba514..35383076d9e1 100644 --- a/src/graphql/data/ghec/schema.docs.graphql +++ b/src/graphql/data/ghec/schema.docs.graphql @@ -19546,6 +19546,11 @@ type Issue implements Assignable & Closable & Comment & Deletable & Labelable & """ viewerCanReopen: Boolean! + """ + Check if the current viewer can set fields on the issue. + """ + viewerCanSetFields: Boolean + """ Check if the viewer is able to change their subscription status for the repository. """ @@ -51312,6 +51317,11 @@ type Repository implements Node & PackageOwner & ProjectOwner & ProjectV2Recent reason: "Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. Removal on 2025-04-01 UTC." ) + """ + Indicates whether the current user can see issue fields in this repository + """ + viewerCanSeeIssueFields: Boolean! + """ Check if the viewer is able to change their subscription status for the repository. """ diff --git a/src/graphql/data/ghec/schema.json b/src/graphql/data/ghec/schema.json index 330b31b5e6fa..e419ae375c86 100644 --- a/src/graphql/data/ghec/schema.json +++ b/src/graphql/data/ghec/schema.json @@ -30735,6 +30735,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "viewerCanSetFields", + "description": "

Check if the current viewer can set fields on the issue.

", + "type": "Boolean", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "viewerCanSubscribe", "description": "

Check if the viewer is able to change their subscription status for the repository.

", @@ -67952,6 +67960,14 @@ "isDeprecated": true, "deprecationReason": "

Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. Removal on 2025-04-01 UTC.

" }, + { + "name": "viewerCanSeeIssueFields", + "description": "

Indicates whether the current user can see issue fields in this repository.

", + "type": "Boolean!", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "viewerCanSubscribe", "description": "

Check if the viewer is able to change their subscription status for the repository.

", diff --git a/src/secret-scanning/data/public-docs.yml b/src/secret-scanning/data/public-docs.yml index ac6013a4286c..71432d567c13 100644 --- a/src/secret-scanning/data/public-docs.yml +++ b/src/secret-scanning/data/public-docs.yml @@ -5558,7 +5558,7 @@ isPublic: true isPrivateWithGhas: true hasPushProtection: true - hasValidityCheck: '{% ifversion fpt or ghes %}false{% else %}true{% endif %}' + hasValidityCheck: false base64Supported: false isduplicate: true - provider: WorkOS @@ -5571,7 +5571,7 @@ isPublic: true isPrivateWithGhas: true hasPushProtection: true - hasValidityCheck: '{% ifversion fpt or ghes %}false{% else %}true{% endif %}' + hasValidityCheck: false base64Supported: false isduplicate: true - provider: xAI diff --git a/src/secret-scanning/lib/config.json b/src/secret-scanning/lib/config.json index 336df820aaaa..97c11d9f3b91 100644 --- a/src/secret-scanning/lib/config.json +++ b/src/secret-scanning/lib/config.json @@ -1,5 +1,5 @@ { - "sha": "428b03b8d51ba2b06dcd11b03a5548e627c64faf", - "blob-sha": "7acf4c4d90e79612ebf5f405772e3678a1757711", + "sha": "44a6c7a210c90e7d599674b70e8835b5292b4215", + "blob-sha": "c74f02d913adea5b78986158480cb9533e41bafe", "targetFilename": "code-security/secret-scanning/introduction/supported-secret-scanning-patterns" } \ No newline at end of file