diff --git a/content/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning-at-scale.md b/content/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning-at-scale.md index 70f08574ecb3..2f5e6331a1d9 100644 --- a/content/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning-at-scale.md +++ b/content/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning-at-scale.md @@ -45,8 +45,7 @@ For repositories that are not eligible for default setup, you can configure adva A repository must meet all the following criteria to be eligible for default setup, otherwise you need to use advanced setup. * Advanced setup for {% data variables.product.prodname_code_scanning %} is not already enabled. -* {% data variables.product.prodname_actions %} are enabled.{% ifversion default-setup-pre-enablement %} -* Uses Go, JavaScript/TypeScript, Python, or Ruby.{% endif %} +{% ifversion default-setup-pre-enablement %}* Uses Go, JavaScript/TypeScript, Python, or Ruby.{% endif %} {% data reusables.code-scanning.require-actions-ghcs %} {% ifversion default-setup-pre-enablement %} diff --git a/content/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks.md b/content/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks.md index 51b7a825797b..62b4d1af0421 100644 --- a/content/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks.md +++ b/content/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks.md @@ -68,3 +68,11 @@ Forks within the same organization copy the collaborators and team settings of t * Any teams from the upstream permission structure that exist and are visible in the target organization or user namespace will have their permissions copied. * Admin permissions remain with the upstream owner, except when a user forks into a different organization. * If that repository is forked to a user namespace, the organization maintains admin permissions and any teams with access maintain access. + +{% ifversion ghec or ghes %} + +### About forks within an enterprise + +Internal repositories only support a single level of forking, it is not possible to fork a private fork of an internal repository. This is intentional to simplify access and management for internal repositories which have enterprise-wide access. This differs from the behavior of public and private repositories, that allow nested forking. + +{% endif %} diff --git a/src/frame/components/DefaultLayout.tsx b/src/frame/components/DefaultLayout.tsx index d1e194ae2313..f5d4f7c1fe7a 100644 --- a/src/frame/components/DefaultLayout.tsx +++ b/src/frame/components/DefaultLayout.tsx @@ -30,6 +30,7 @@ export const DefaultLayout = (props: Props) => { fullUrl, status, } = mainContext + const xHost = mainContext.xHost const page = mainContext.page! const { t } = useTranslation(['meta', 'scroll_button']) const router = useRouter() @@ -60,7 +61,7 @@ export const DefaultLayout = (props: Props) => { const metaDescription = page.introPlainText ? page.introPlainText : t('default_description') const SOCIAL_CATEGORIES = new Set(['code-security', 'actions', 'issues', 'copilot']) - const SOCIAL_CARD_IMG_BASE_URL = '/assets/cb-345/images/social-cards' + const SOCIAL_CARD_IMG_BASE_URL = `${xHost}/assets/cb-345/images/social-cards` function getCategoryImageUrl(category: string): string { return `${SOCIAL_CARD_IMG_BASE_URL}/${category}.png` diff --git a/src/frame/components/context/MainContext.tsx b/src/frame/components/context/MainContext.tsx index 804564f7ac0d..14f5ec9e4f83 100644 --- a/src/frame/components/context/MainContext.tsx +++ b/src/frame/components/context/MainContext.tsx @@ -86,6 +86,7 @@ type EnterpriseServerReleases = { } export type MainContextT = { + allVersions: Record breadcrumbs: { product: BreadcrumbT category?: BreadcrumbT @@ -96,21 +97,21 @@ export type MainContextT = { name: string href: string } + currentCategory?: string + currentPathWithoutLanguage: string currentProduct?: ProductT currentProductName: string + currentProductTree?: ProductTreeNode | null currentLayoutName?: string - isHomepageVersion: boolean + currentVersion?: string data: DataT - error: string - currentCategory?: string - relativePath?: string enterpriseServerReleases: EnterpriseServerReleases - currentPathWithoutLanguage: string - allVersions: Record - currentVersion?: string - currentProductTree?: ProductTreeNode | null - sidebarTree?: ProductTreeNode | null + enterpriseServerVersions: Array + error: string featureFlags: FeatureFlags + fullUrl: string + isHomepageVersion: boolean + nonEnterpriseDefaultVersion: string page: { documentType: string type?: string @@ -122,13 +123,10 @@ export type MainContextT = { noEarlyAccessBanner: boolean applicableVersions: string[] } | null - - enterpriseServerVersions: Array - - nonEnterpriseDefaultVersion: string - + relativePath?: string + sidebarTree?: ProductTreeNode | null status: number - fullUrl: string + xHost?: string } // Write down the namespaces from `data/ui.yml` that are used on all pages, @@ -231,26 +229,32 @@ export const getMainContext = async (req: any, res: any): Promise const currentProductName: string = req.context.currentProductName || '' const props: MainContextT = { + allVersions: minimalAllVersions(req.context.allVersions), breadcrumbs: req.context.breadcrumbs || {}, communityRedirect: req.context.page?.communityRedirect || {}, + currentCategory: req.context.currentCategory || '', + currentLayoutName: req.context.currentLayoutName || null, + currentPathWithoutLanguage: req.context.currentPathWithoutLanguage, currentProduct, currentProductName, - isHomepageVersion: req.context.page?.documentType === 'homepage', - error: req.context.error ? req.context.error.toString() : '', + // This is a slimmed down version of `req.context.currentProductTree` + // that only has the minimal titles stuff needed for sidebars and + // any page that is hidden is omitted. + // However, it's not needed on most pages. For example, on article pages, + // you don't need it. It's similar to the minimal product tree but, + // has the full length titles and not just the short titles. + currentProductTree: + (includeFullProductTree && req.context.currentProductTreeTitlesExcludeHidden) || null, + currentVersion: req.context.currentVersion, data: { ui, - reusables, - variables: { release_candidate: { version: releaseCandidateVersion, }, }, }, - currentCategory: req.context.currentCategory || '', - currentPathWithoutLanguage: req.context.currentPathWithoutLanguage, - page: pageInfo, enterpriseServerReleases: pick(req.context.enterpriseServerReleases, [ 'isOldestReleaseDeprecated', 'oldestSupported', @@ -258,31 +262,20 @@ export const getMainContext = async (req: any, res: any): Promise 'supported', ]), enterpriseServerVersions: req.context.enterpriseServerVersions, - allVersions: minimalAllVersions(req.context.allVersions), - currentVersion: req.context.currentVersion, - // This is a slimmed down version of `req.context.currentProductTree` - // that only has the minimal titles stuff needed for sidebars and - // any page that is hidden is omitted. - // However, it's not needed on most pages. For example, on article pages, - // you don't need it. It's similar to the minimal product tree but, - // has the full length titles and not just the short titles. - currentProductTree: - (includeFullProductTree && req.context.currentProductTreeTitlesExcludeHidden) || null, + error: req.context.error ? req.context.error.toString() : '', + featureFlags: {}, + fullUrl: req.protocol + '://' + req.hostname + req.originalUrl, // does not include port for localhost + isHomepageVersion: req.context.page?.documentType === 'homepage', + nonEnterpriseDefaultVersion: req.context.nonEnterpriseDefaultVersion, + page: pageInfo, + relativePath: req.context.page?.relativePath || null, // The minimal product tree is needed on all pages that depend on // the product sidebar or the rest sidebar. sidebarTree: (includeSidebarTree && req.context.sidebarTree) || null, - featureFlags: {}, - nonEnterpriseDefaultVersion: req.context.nonEnterpriseDefaultVersion, status: res.statusCode, - fullUrl: req.protocol + '://' + req.hostname + req.originalUrl, // does not include port for localhost + xHost: req.get('x-host') || '', } - if (req.context.currentLayoutName) { - props.currentLayoutName = req.context.currentLayoutName - } - if (req.context.page?.relativePath) { - props.relativePath = req.context.page.relativePath - } return props }