diff --git a/content/admin/configuring-settings/configuring-github-connect/about-github-connect.md b/content/admin/configuring-settings/configuring-github-connect/about-github-connect.md index 861243944185..6eabd559e39b 100644 --- a/content/admin/configuring-settings/configuring-github-connect/about-github-connect.md +++ b/content/admin/configuring-settings/configuring-github-connect/about-github-connect.md @@ -29,13 +29,14 @@ After you configure the connection between {% data variables.location.product_lo | Feature | Description | More information | | ----------- | ----------- | ----------- | -| {% ifversion ghes %} | -Automatic user license sync | Manage license usage across your {% data variables.product.prodname_enterprise %} deployments by automatically syncing user licenses from {% data variables.location.product_location %} to {% data variables.product.prodname_ghe_cloud %}. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise)"|{% endif %}{% ifversion ghes %} -{% data variables.product.prodname_dependabot %} | Allow users to find and fix vulnerabilities in code dependencies. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)"{% endif %} -{% data variables.product.prodname_dotcom_the_website %} actions | Allow users to use actions from {% data variables.product.prodname_dotcom_the_website %} in public workflow files. | "[AUTOTITLE](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)"{% ifversion server-statistics %} -{% data variables.product.prodname_server_statistics %} | Analyze your own aggregate data from GitHub Enterprise Server, and help us improve GitHub products. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)"{% endif %} -Unified search | Allow users to include repositories on {% data variables.product.prodname_dotcom_the_website %} in their search results when searching from {% data variables.location.product_location %}. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise)" -Unified contributions | Allow users to include anonymized contribution counts for their work on {% data variables.location.product_location %} in their contribution graphs on {% data variables.product.prodname_dotcom_the_website %}. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise)" +| Automatic user license sync | Manage license usage across your {% data variables.product.prodname_enterprise %} deployments by automatically syncing user licenses from {% data variables.location.product_location %} to {% data variables.product.prodname_ghe_cloud %}. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise)" | +| {% data variables.product.prodname_dependabot %} | Allow users to find and fix vulnerabilities in code dependencies. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)" | +| {% data variables.product.prodname_dotcom_the_website %} actions | Allow users to use actions from {% data variables.product.prodname_dotcom_the_website %} in public workflow files. | "[AUTOTITLE](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)" | +| {% ifversion server-statistics %} | +| {% data variables.product.prodname_server_statistics %} | Analyze your own aggregate data from GitHub Enterprise Server, and help us improve GitHub products. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" | +| {% endif %} | +| Unified search | Allow users to include repositories on {% data variables.product.prodname_dotcom_the_website %} in their search results when searching from {% data variables.location.product_location %}. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise)" | +| Unified contributions | Allow users to include anonymized contribution counts for their work on {% data variables.location.product_location %} in their contribution graphs on {% data variables.product.prodname_dotcom_the_website %}. | "[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise)" | ## Data transmission for {% data variables.product.prodname_github_connect %} diff --git a/content/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise.md b/content/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise.md index 83136640311b..112022d83b1c 100644 --- a/content/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise.md +++ b/content/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise.md @@ -63,16 +63,16 @@ The license usage report for your enterprise is a CSV file that contains the fol | github_com_verified_domain_emails | All email addresses associated with the user's GHEC account that match your enterprise's verified domains | | github_com_saml_name_id | The SAML username | | github_com_orgs_with_pending_invites | All pending invitations for the user's GHEC account to join organizations within your enterprise | -{%- ifversion ghas-in-license-sync %} +| {% ifversion ghas-in-license-sync %} | | github_com_advanced_security_license_user | Whether or not the user consumes a {% data variables.product.prodname_GH_advanced_security %} license on GHEC | -{%- endif %} +| {% endif %} | | license_type | Can be one of: `Visual Studio subscription` or `Enterprise` | enterprise_server_user| Whether or not the user has at least one account on GHES | | enterprise_server_primary_emails | The primary email addresses associated with each of the user's GHES accounts | | enterprise_server_user_ids | For each of the user's GHES accounts, the account's user ID -{%- ifversion ghas-in-license-sync %} +| {% ifversion ghas-in-license-sync %} | | enterprise_server_advanced_security_user_ids | The GHES instances where the user is using {% data variables.product.prodname_GH_advanced_security %} {% ifversion ghec %}(only present if you are using GHES version 3.12 or later, and have enabled license sync){% endif %} | -{%- endif %} +| {% endif %} | | total_user_accounts | The total number of accounts the person has across both GHEC and GHES | visual_studio_subscription_user | Whether or not the user is a {% data variables.visual_studio.prodname_vs_subscriber %} | | visual_studio_subscription_email | The email address associated with the user's VSS | diff --git a/src/frame/middleware/index.ts b/src/frame/middleware/index.ts index 3b010aaf9203..ccb895143f13 100644 --- a/src/frame/middleware/index.ts +++ b/src/frame/middleware/index.ts @@ -64,7 +64,7 @@ import mockVaPortal from './mock-va-portal.js' import dynamicAssets from '@/assets/middleware/dynamic-assets.js' import contextualizeSearch from '@/search/middleware/contextualize.js' import shielding from '@/shielding/middleware' -import tracking from '@/tracking/middleware/index.js' +import tracking from '@/tracking/middleware' import { MAX_REQUEST_TIMEOUT } from '@/frame/lib/constants.js' const { DEPLOYMENT_ENV, NODE_ENV } = process.env diff --git a/src/tracking/middleware/handle-query-strings.js b/src/tracking/middleware/handle-query-strings.ts similarity index 82% rename from src/tracking/middleware/handle-query-strings.js rename to src/tracking/middleware/handle-query-strings.ts index 97a7e2806708..f128bb1d457f 100644 --- a/src/tracking/middleware/handle-query-strings.js +++ b/src/tracking/middleware/handle-query-strings.ts @@ -1,5 +1,8 @@ -import statsd from '#src/observability/lib/statsd.js' -import { noCacheControl } from '#src/frame/middleware/cache-control.js' +import type { Response, NextFunction } from 'express' + +import type { ExtendedRequest } from '@/types' +import statsd from '@/observability/lib/statsd.js' +import { noCacheControl } from '@/frame/middleware/cache-control.js' const STATSD_KEY = 'middleware.handle_tracking_querystrings' @@ -10,7 +13,11 @@ export const MAX_DOMAINS_SAVED = 3 const DOMAIN_COOKIE_AGE_MS = 365 * 24 * 3600 * 1000 export const DOMAIN_COOKIE_NAME = 'github_domains' -export default function handleTrackingQueryStrings(req, res, next) { +export default function handleTrackingQueryStrings( + req: ExtendedRequest, + res: Response, + next: NextFunction, +) { if (req.path.startsWith('/_next/')) { return next() } @@ -25,9 +32,9 @@ export default function handleTrackingQueryStrings(req, res, next) { return } - const searchParams = new URLSearchParams(req.query) + const searchParams = new URLSearchParams(req.query as any) - const oldCookieValue = req.cookies[DOMAIN_COOKIE_NAME] || '' + const oldCookieValue: string = req.cookies[DOMAIN_COOKIE_NAME] || '' const oldCookieValueParsed = oldCookieValue .split(',') .map((x) => x.trim().toLowerCase()) diff --git a/src/tracking/middleware/index.js b/src/tracking/middleware/index.ts similarity index 100% rename from src/tracking/middleware/index.js rename to src/tracking/middleware/index.ts diff --git a/src/tracking/tests/handle-query-string.js b/src/tracking/tests/handle-query-string.ts similarity index 97% rename from src/tracking/tests/handle-query-string.js rename to src/tracking/tests/handle-query-string.ts index 4857e4a69fb0..0624d93ad186 100644 --- a/src/tracking/tests/handle-query-string.js +++ b/src/tracking/tests/handle-query-string.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest' -import { get } from '#src/tests/helpers/e2etest.js' +import { get } from '@/tests/helpers/e2etest.js' import { DOMAIN_QUERY_PARAM, DOMAIN_COOKIE_NAME, @@ -83,7 +83,7 @@ describe('setting a cookie', () => { const res = await get(`/?${DOMAIN_QUERY_PARAM}=${next}`, { headers: { cookie }, }) - const setCookie = res.headers['set-cookie'][0] + const setCookie: string = res.headers['set-cookie'][0] cookie = setCookie.split(';').filter((x) => x.startsWith(DOMAIN_COOKIE_NAME))[0] if (letter === 'a') { // first