From ab817e496478e0231572cb6eca5f8a95c648a2c0 Mon Sep 17 00:00:00 2001 From: Laura Coursen Date: Thu, 20 Apr 2023 10:01:50 -0500 Subject: [PATCH 1/3] Team Sync opt-out for membership provisioning (#35441) --- ...nization-for-organizations-in-your-enterprise.md | 13 +++++++++++++ ...ng-team-synchronization-for-your-organization.md | 13 +++++++++++++ ...nizing-a-team-with-an-identity-provider-group.md | 9 ++++++++- data/features/team-sync-manage-org-invites.yml | 2 ++ .../team-sync-org-invites.md | 1 + 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 data/features/team-sync-manage-org-invites.yml create mode 100644 data/reusables/identity-and-permissions/team-sync-org-invites.md diff --git a/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise.md b/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise.md index 3beb3f6e2b..b3c7ac42b5 100644 --- a/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise.md +++ b/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise.md @@ -26,6 +26,10 @@ If you use SAML at the enterprise level with Azure AD as your IdP, you can enabl {% data reusables.identity-and-permissions.about-team-sync %} +{% ifversion team-sync-manage-org-invites %} +{% data reusables.identity-and-permissions.team-sync-org-invites %} +{% endif %} + {% data reusables.identity-and-permissions.sync-team-with-idp-group %} {% data reusables.identity-and-permissions.team-sync-disable %} @@ -53,3 +57,12 @@ You can also configure and manage team synchronization for an individual organiz {% data reusables.identity-and-permissions.team-sync-confirm %} 7. Review the details for the IdP tenant you want to connect to your enterprise account, then click **Approve**. 8. To disable team synchronization, under "Team synchronization", click **Disable team synchronization**. + +{% ifversion team-sync-manage-org-invites %} +## Managing whether team synchronization can invite non-members to organizations + +{% data reusables.enterprise-accounts.access-enterprise %} +{% data reusables.enterprise-accounts.settings-tab %} +{% data reusables.enterprise-accounts.security-tab %} +1. Under "Team synchronization", select or deselect **Do not allow Team Sync to invite non-members to organizations.** +{% endif %} \ No newline at end of file diff --git a/content/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization.md b/content/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization.md index 38035cc962..5e4b911475 100644 --- a/content/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization.md +++ b/content/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization.md @@ -27,6 +27,10 @@ You can enable team synchronization between your IdP and {% data variables.produ {% data reusables.identity-and-permissions.supported-idps-team-sync %} +{% ifversion team-sync-manage-org-invites %} +{% data reusables.identity-and-permissions.team-sync-org-invites %} +{% endif %} + {% data reusables.identity-and-permissions.sync-team-with-idp-group %} You can also enable team synchronization for all organizations owned by an enterprise account. If SAML is configured at the enterprise level, you cannot enable team synchronization on an individual organization. Instead, you must configure team synchronization for the entire enterprise. For more information, see "[AUTOTITLE](/enterprise-cloud@latest/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise)." @@ -88,6 +92,15 @@ For help on provisioning users that have missing a missing SCIM linked identity, 1. In the "URL" field, type the URL for your Okta instance. 1. Review the identity provider tenant information you want to connect to your organization, then click **Create**. +{% ifversion team-sync-manage-org-invites %} +## Managing whether team sync can invite non-members to your organization + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.security %} +1. Under "Team synchronization", select or deselect **Do not allow Team Sync to invite non-members to this organization.** +{% endif %} + ## Disabling team synchronization {% data reusables.identity-and-permissions.team-sync-disable %} diff --git a/content/organizations/organizing-members-into-teams/synchronizing-a-team-with-an-identity-provider-group.md b/content/organizations/organizing-members-into-teams/synchronizing-a-team-with-an-identity-provider-group.md index b033cee019..5253cb5d05 100644 --- a/content/organizations/organizing-members-into-teams/synchronizing-a-team-with-an-identity-provider-group.md +++ b/content/organizations/organizing-members-into-teams/synchronizing-a-team-with-an-identity-provider-group.md @@ -28,6 +28,10 @@ Once a {% data variables.product.prodname_dotcom %} team is connected to an IdP {% ifversion ghec %}{% data reusables.enterprise-accounts.team-sync-override %}{% endif %} +{% ifversion team-sync-manage-org-invites %} +{% data reusables.identity-and-permissions.team-sync-org-invites %} For more information, see "[AUTOTITLE](/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization#managing-whether-team-synchronization-can-invite-non-members-to-your-organization)" and "[AUTOTITLE](/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise#managing-whether-team-synchronization-can-invite-non-members-to-organizations)." +{% endif %} + {% ifversion ghec %} All team membership changes made through your IdP will appear in the audit log on {% data variables.product.product_name %} as changes made by the team synchronization bot. Team synchronization will fetch group information from your IdP at least once every hour, and reflect any changes in IdP group membership into {% data variables.product.product_name %}. Connecting a team to an IdP group may remove some team members. For more information, see "[Requirements for members of synchronized teams](#requirements-for-members-of-synchronized-teams)." @@ -47,7 +51,10 @@ To manage repository access for any {% data variables.product.prodname_dotcom %} ## Requirements for members of synchronized teams After you connect a team to an IdP group, team synchronization will add each member of the IdP group to the corresponding team on {% data variables.product.product_name %} only if: -- The person is a member of the organization on {% data variables.product.product_name %}. + +{%- ifversion team-sync-manage-org-invites %} +- If team synchronization is not allowed to invite non-members to your organization, the person is already a member of the organization on {% data variables.product.product_name %}. +-{%- endif %} - The person has already logged in with their personal account on {% data variables.product.product_name %} and authenticated to the organization or enterprise account via SAML single sign-on at least once. - The person's SSO identity is a member of the IdP group. diff --git a/data/features/team-sync-manage-org-invites.yml b/data/features/team-sync-manage-org-invites.yml new file mode 100644 index 0000000000..1a45eecc80 --- /dev/null +++ b/data/features/team-sync-manage-org-invites.yml @@ -0,0 +1,2 @@ +versions: + ghec: '*' diff --git a/data/reusables/identity-and-permissions/team-sync-org-invites.md b/data/reusables/identity-and-permissions/team-sync-org-invites.md new file mode 100644 index 0000000000..84d51873b4 --- /dev/null +++ b/data/reusables/identity-and-permissions/team-sync-org-invites.md @@ -0,0 +1 @@ +By default, team synchronization does not invite non-members to join organizations, which means that a user will only be successfully added to a team if they are already an organization member. If you prefer, you can allow team synchronization to invite non-members to join organizations. From 784e937b85b75d6ede12063bc4353803c38e2dd9 Mon Sep 17 00:00:00 2001 From: Grace Park Date: Thu, 20 Apr 2023 08:14:07 -0700 Subject: [PATCH 2/3] Remove code examples on code security and codespaces landing pages (#36496) --- components/context/ProductLandingContext.tsx | 2 - components/landing/CodeExampleCard.tsx | 41 ------ components/landing/CodeExamples.tsx | 120 ------------------ components/landing/ProductLanding.tsx | 21 +-- content/code-security/index.md | 1 - content/codespaces/index.md | 1 - data/product-examples/README.md | 9 +- .../code-security/code-examples.yml | 86 ------------- .../codespaces/code-examples.yml | 54 -------- .../contextualizers/product-examples.js | 19 --- tests/fixtures/content/code-security/index.md | 1 - .../code-security/code-examples.yml | 86 ------------- .../playwright-rendering.spec.ts | 28 ---- 13 files changed, 5 insertions(+), 464 deletions(-) delete mode 100644 components/landing/CodeExampleCard.tsx delete mode 100644 components/landing/CodeExamples.tsx delete mode 100644 data/product-examples/code-security/code-examples.yml delete mode 100644 data/product-examples/codespaces/code-examples.yml delete mode 100644 tests/fixtures/data/product-examples/code-security/code-examples.yml diff --git a/components/context/ProductLandingContext.tsx b/components/context/ProductLandingContext.tsx index e9a06a702c..d1e27671b8 100644 --- a/components/context/ProductLandingContext.tsx +++ b/components/context/ProductLandingContext.tsx @@ -42,7 +42,6 @@ export type ProductLandingContextT = { productVideo: string productVideoTranscript: string featuredLinks: Record> - productCodeExamples: Array productUserExamples: Array<{ username: string; description: string }> productCommunityExamples: Array<{ repo: string; description: string }> featuredArticles: Array<{ @@ -117,7 +116,6 @@ export const getProductLandingContextFromRequest = async ( }, whatsNewChangelog: req.context.whatsNewChangelog || [], changelogUrl: req.context.changelogUrl || [], - productCodeExamples: req.context.productCodeExamples || [], productCommunityExamples: req.context.productCommunityExamples || [], ghesReleases: req.context.ghesReleases || [], diff --git a/components/landing/CodeExampleCard.tsx b/components/landing/CodeExampleCard.tsx deleted file mode 100644 index b8f050715a..0000000000 --- a/components/landing/CodeExampleCard.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { RepoIcon } from '@primer/octicons-react' -import { CodeExample } from 'components/context/ProductLandingContext' -import { TruncateLines } from 'components/ui/TruncateLines' -import { Label } from '@primer/react' - -type Props = { - example: CodeExample -} -export const CodeExampleCard = ({ example }: Props) => { - return ( - -
-

{example.title}

-

{example.description}

-
- {example.tags.map((tag) => { - return ( - - ) - })} -
-
-
- - - {example.href} - -
-
- ) -} diff --git a/components/landing/CodeExamples.tsx b/components/landing/CodeExamples.tsx deleted file mode 100644 index 6c75361e8f..0000000000 --- a/components/landing/CodeExamples.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import { useEffect, useState } from 'react' -import { ArrowRightIcon, SearchIcon } from '@primer/octicons-react' -import { Text } from '@primer/react' - -import { useProductLandingContext } from 'components/context/ProductLandingContext' -import { useTranslation } from 'components/hooks/useTranslation' -import { CodeExampleCard } from 'components/landing/CodeExampleCard' -import { Link } from 'components/Link' - -const PAGE_SIZE = 6 -export const CodeExamples = () => { - const { productCodeExamples } = useProductLandingContext() - const { t } = useTranslation('product_landing') - const [numVisible, setNumVisible] = useState(PAGE_SIZE) - const [search, setSearch] = useState('') - const [typed, setTyped] = useState('') - - useEffect(() => { - setNumVisible(PAGE_SIZE) // reset the visible count (only matters after searching) - }, [search]) - - const isSearching = !!search - let searchResults: typeof productCodeExamples = [] - if (isSearching) { - // The following replace method escapes special characters in regular expression creation. - const matchReg = new RegExp(search.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'i') - searchResults = productCodeExamples.filter((example) => { - const searchableStr = `${example.tags.join(' ')} ${example.title} ${example.description}` - return matchReg.test(searchableStr) - }) - } - - return ( -
-
{ - event.preventDefault() - setSearch(typed.trim()) - }} - > - - {t('code_example.search_examples')} - - setTyped(event.target.value)} - value={typed} - /> - -
- - {isSearching && ( -
-

- {t('search_results_for')}: {search} -

-

- {t('matches_displayed')}: {searchResults.length} -

-
- )} -
    - {(isSearching ? searchResults : productCodeExamples.slice(0, numVisible)).map((example) => { - return ( -
  • - -
  • - ) - })} -
- - {numVisible < productCodeExamples.length && !isSearching && ( - - )} - - {isSearching && searchResults.length === 0 && ( -
-
- {' '} -
-

- {t('sorry')} {search} -

-

- {t('no_example')}
{t('try_another')} -

- - {t('learn')} - -
- )} -
- ) -} diff --git a/components/landing/ProductLanding.tsx b/components/landing/ProductLanding.tsx index c5c3f3910e..dc2525a3e9 100644 --- a/components/landing/ProductLanding.tsx +++ b/components/landing/ProductLanding.tsx @@ -7,7 +7,6 @@ import { FeaturedArticles } from 'components/landing/FeaturedArticles' import { GuideCards } from 'components/landing/GuideCards' import { SponsorsExamples } from 'components/landing/SponsorsExamples' import { CommunityExamples } from 'components/landing/CommunityExamples' -import { CodeExamples } from 'components/landing/CodeExamples' import { LandingSection } from 'components/landing/LandingSection' import { useTranslation } from 'components/hooks/useTranslation' import { ProductArticlesList } from 'components/landing/ProductArticlesList' @@ -18,14 +17,8 @@ import { RestRedirect } from 'components/RestRedirect' export const ProductLanding = () => { const router = useRouter() const { isEnterpriseServer } = useVersion() - const { - title, - shortTitle, - featuredLinks, - productUserExamples, - productCommunityExamples, - productCodeExamples, - } = useProductLandingContext() + const { title, shortTitle, featuredLinks, productUserExamples, productCommunityExamples } = + useProductLandingContext() const { t } = useTranslation('product_landing') return ( @@ -40,16 +33,6 @@ export const ProductLanding = () => { - {productCodeExamples.length > 0 && ( - - - - )} - {productCommunityExamples.length > 0 && ( diff --git a/content/code-security/index.md b/content/code-security/index.md index 573e30327a..fca3030538 100644 --- a/content/code-security/index.md +++ b/content/code-security/index.md @@ -37,7 +37,6 @@ changelog: versions: fpt: '*' ghec: '*' -examples_source: data/product-examples/code-security/code-examples.yml layout: product-landing versions: fpt: '*' diff --git a/content/codespaces/index.md b/content/codespaces/index.md index 8bf8fd7437..4f9a236abf 100644 --- a/content/codespaces/index.md +++ b/content/codespaces/index.md @@ -37,7 +37,6 @@ redirect_from: - /github/developing-online-with-github-codespaces - /github/developing-online-with-codespaces layout: product-landing -examples_source: data/product-examples/codespaces/code-examples.yml versions: fpt: '*' ghec: '*' diff --git a/data/product-examples/README.md b/data/product-examples/README.md index f5911522dd..db4072ba89 100644 --- a/data/product-examples/README.md +++ b/data/product-examples/README.md @@ -2,18 +2,15 @@ Pages that use the `product-landing` layout may optionally include an `Examples` section. Currently, we support three types of examples: -1. Code examples - See https://docs.github.com/en/codespaces#code-examples. - -2. Community examples +1. Community examples See https://docs.github.com/en/discussions#community-examples. -3. User examples +2. User examples See https://docs.github.com/en/sponsors#community-examples. ## How it works -Example data for each product is defined in `data/product-landing-examples`, in a subdirectory named for the **product** and a YML file named for the **example type** (e.g., `data/product-examples/sponsors/user-examples.yml` or `data/product-examples/codespaces/code-examples.yml`). We currently only support one type of example per product. +Example data for each product is defined in `data/product-landing-examples`, in a subdirectory named for the **product** and a YML file named for the **example type** (e.g., `data/product-examples/sponsors/user-examples.yml` or `data/product-examples/discussions/community-examples.yml`). We currently only support one type of example per product. ### Versioning diff --git a/data/product-examples/code-security/code-examples.yml b/data/product-examples/code-security/code-examples.yml deleted file mode 100644 index 5296f72264..0000000000 --- a/data/product-examples/code-security/code-examples.yml +++ /dev/null @@ -1,86 +0,0 @@ -# Code scanning configurations -- title: CodeQL code scanning at Microsoft - description: Example code scanning workflow for the CodeQL action from the Microsoft Open Source repository. - href: /microsoft/opensource.microsoft.com/blob/main/.github/workflows/codeql-analysis.yml - languages: - - javascript - tags: - - CodeQL - - Code scanning - - GitHub Actions -- title: Adversarial Robustness Toolbox (ART) CodeQL code scanning - description: Example code scanning workflow for the CodeQL action from the Trusted AI repository. - href: /Trusted-AI/adversarial-robustness-toolbox/blob/main/.github/workflows/codeql-analysis.yml - languages: - - python - tags: - - CodeQL - - Code scanning - - GitHub Actions - -# Security policies -- title: Microsoft security policy template - description: Example security policy - href: /microsoft/repo-templates/blob/main/shared/SECURITY.md - tags: - - Security policy -- title: Electron security policy - description: Example security policy - href: /electron/electron/blob/master/SECURITY.md - tags: - - Security policy - -# Example of security advisory in a major product -- title: Security advisory for Rails - description: Security advisory published by Rails for CVE-2020-15169. - href: /rails/rails/security/advisories/GHSA-cfjv-5498-mph5 - tags: - - Security advisory - -# Sample scripts for enabling Dependabot alerts and security updates across a whole organization -- title: Enable Dependabot alerts and security updates automatically - description: Sample scripts for enabling Dependabot alerts and security updates across an entire organization. - href: /github/enable-security-alerts-sample - tags: - - Dependabot - - Alerts - - Security updates - - Organization - - Scripts - versions: - fpt: '*' - ghec: '*' - ghes: '>=3.3' - -# Dependabot configuration only relevant to GitHub.com and GHES 3.3+ -# Convert "languages" to "package-ecosystems" for Dependabot configurations -- title: Super linter configuration - description: Example Dependabot version updates configuration from the Super linter repository. - href: /github/super-linter/blob/master/.github/dependabot.yml - languages: - - github-actions - - npm - - bundler - - docker - - pip - tags: - - Dependabot - - Version updates - - Configuration - versions: - fpt: '*' - ghec: '*' - ghes: '>=3.3' - -- title: Dependabot version update PR - description: Example pull request generated by the Dependabot version updates configuration in the Super linter repository. - href: /github/super-linter/pull/1398 - languages: - tags: - - Dependabot - - Version updates - - Pull requests - versions: - fpt: '*' - ghec: '*' - ghes: '>=3.3' diff --git a/data/product-examples/codespaces/code-examples.yml b/data/product-examples/codespaces/code-examples.yml deleted file mode 100644 index 232293c3d6..0000000000 --- a/data/product-examples/codespaces/code-examples.yml +++ /dev/null @@ -1,54 +0,0 @@ -- title: .NET sample project - description: Try a .NET project with a custom dev container - languages: .NET - href: microsoft/vscode-remote-try-dotnet - tags: - - development containers -- title: C++ sample project - description: Try a C++ project with a custom dev container - languages: C++ - href: microsoft/vscode-remote-try-cpp - tags: - - development containers -- title: Java sample project - description: Try a Java project with a custom dev container - languages: Java - href: microsoft/vscode-remote-try-java - tags: - - development containers -- title: Node.js sample project - description: Try a Node.js project with a custom dev container - languages: Javascript - href: microsoft/vscode-remote-try-node - tags: - - development containers -- title: Go sample project - description: Try a Go project with a custom dev container - languages: Go - href: microsoft/vscode-remote-try-go - tags: - - development containers -- title: Python sample project - description: Try a Python project with a custom dev container - languages: Python - href: microsoft/vscode-remote-try-python - tags: - - development containers -- title: Rust sample project - description: Try a Rust project with a custom dev container - languages: Rust - href: microsoft/vscode-remote-try-rust - tags: - - development containers -- title: PHP sample project - description: Try a PHP project with a custom dev container - languages: PHP - href: microsoft/vscode-remote-try-php - tags: - - development containers -- title: Azure SQL and SQL Server sample project - description: Try an Azure SQL or SQL Server project with a custom dev container - languages: SQL - href: microsoft/vscode-remote-try-sqlserver - tags: - - development containers diff --git a/middleware/contextualizers/product-examples.js b/middleware/contextualizers/product-examples.js index c653c694a6..e707943833 100644 --- a/middleware/contextualizers/product-examples.js +++ b/middleware/contextualizers/product-examples.js @@ -1,4 +1,3 @@ -import getApplicableVersions from '../../lib/get-applicable-versions.js' import { getDataByLanguage } from '../../lib/get-data.js' function getProductExampleData(product, key, language) { @@ -34,23 +33,5 @@ export default async function productExamples(req, res, next) { currentLanguage ) - const productCodeExamples = getProductExampleData( - currentProduct, - 'code-examples', - currentLanguage - ) - - // We currently only support versioning in code examples. - // TODO support versioning across all example types. - req.context.productCodeExamples = - productCodeExamples && - productCodeExamples.filter((example) => { - // If an example block does NOT contain the versions prop, assume it's available in all versions - return ( - !example.versions || - getApplicableVersions(example.versions).includes(req.context.currentVersion) - ) - }) - return next() } diff --git a/tests/fixtures/content/code-security/index.md b/tests/fixtures/content/code-security/index.md index 1700b663b7..527bd6053b 100644 --- a/tests/fixtures/content/code-security/index.md +++ b/tests/fixtures/content/code-security/index.md @@ -3,7 +3,6 @@ title: Code security documentation shortTitle: Code security intro: 'Code security' layout: product-landing -examples_source: data/product-examples/code-security/code-examples.yml featuredLinks: startHere: - /code-security/getting-started/quickstart diff --git a/tests/fixtures/data/product-examples/code-security/code-examples.yml b/tests/fixtures/data/product-examples/code-security/code-examples.yml deleted file mode 100644 index 5296f72264..0000000000 --- a/tests/fixtures/data/product-examples/code-security/code-examples.yml +++ /dev/null @@ -1,86 +0,0 @@ -# Code scanning configurations -- title: CodeQL code scanning at Microsoft - description: Example code scanning workflow for the CodeQL action from the Microsoft Open Source repository. - href: /microsoft/opensource.microsoft.com/blob/main/.github/workflows/codeql-analysis.yml - languages: - - javascript - tags: - - CodeQL - - Code scanning - - GitHub Actions -- title: Adversarial Robustness Toolbox (ART) CodeQL code scanning - description: Example code scanning workflow for the CodeQL action from the Trusted AI repository. - href: /Trusted-AI/adversarial-robustness-toolbox/blob/main/.github/workflows/codeql-analysis.yml - languages: - - python - tags: - - CodeQL - - Code scanning - - GitHub Actions - -# Security policies -- title: Microsoft security policy template - description: Example security policy - href: /microsoft/repo-templates/blob/main/shared/SECURITY.md - tags: - - Security policy -- title: Electron security policy - description: Example security policy - href: /electron/electron/blob/master/SECURITY.md - tags: - - Security policy - -# Example of security advisory in a major product -- title: Security advisory for Rails - description: Security advisory published by Rails for CVE-2020-15169. - href: /rails/rails/security/advisories/GHSA-cfjv-5498-mph5 - tags: - - Security advisory - -# Sample scripts for enabling Dependabot alerts and security updates across a whole organization -- title: Enable Dependabot alerts and security updates automatically - description: Sample scripts for enabling Dependabot alerts and security updates across an entire organization. - href: /github/enable-security-alerts-sample - tags: - - Dependabot - - Alerts - - Security updates - - Organization - - Scripts - versions: - fpt: '*' - ghec: '*' - ghes: '>=3.3' - -# Dependabot configuration only relevant to GitHub.com and GHES 3.3+ -# Convert "languages" to "package-ecosystems" for Dependabot configurations -- title: Super linter configuration - description: Example Dependabot version updates configuration from the Super linter repository. - href: /github/super-linter/blob/master/.github/dependabot.yml - languages: - - github-actions - - npm - - bundler - - docker - - pip - tags: - - Dependabot - - Version updates - - Configuration - versions: - fpt: '*' - ghec: '*' - ghes: '>=3.3' - -- title: Dependabot version update PR - description: Example pull request generated by the Dependabot version updates configuration in the Super linter repository. - href: /github/super-linter/pull/1398 - languages: - tags: - - Dependabot - - Version updates - - Pull requests - versions: - fpt: '*' - ghec: '*' - ghes: '>=3.3' diff --git a/tests/rendering-fixtures/playwright-rendering.spec.ts b/tests/rendering-fixtures/playwright-rendering.spec.ts index 160cff872e..80dac9a641 100644 --- a/tests/rendering-fixtures/playwright-rendering.spec.ts +++ b/tests/rendering-fixtures/playwright-rendering.spec.ts @@ -160,34 +160,6 @@ test('navigate with side bar into article inside a map-topic inside a category', await expect(page).toHaveURL(/actions\/category\/map-topic\/article/) }) -test('code examples search', async ({ page }) => { - await page.goto('/code-security') - const codeExampleResults = page.getByTestId('code-example-results') - - // more results after clicking the 'Show more' button - const initialResultsCount = (await codeExampleResults.getByRole('listitem').all()).length - await page.getByTestId('code-examples-show-more').click() - const showedMoreResultsCount = (await codeExampleResults.getByRole('listitem').all()).length - expect(showedMoreResultsCount).toBeGreaterThan(initialResultsCount) - - // search for the 2 'policy' code examples - await page.getByTestId('code-examples-input').click() - await page.getByTestId('code-examples-input').fill('policy') - await page.getByTestId('code-examples-search-btn').click() - expect((await codeExampleResults.getByRole('listitem').all()).length).toBe(2) - await expect(codeExampleResults.getByText('Microsoft security policy template')).toBeVisible() - await expect(codeExampleResults.getByText('Electron security policy')).toBeVisible() - - // what happens when there's no search results - await page.getByTestId('code-examples-input').click() - await page.getByTestId('code-examples-input').fill('should be no results') - await page.getByTestId('code-examples-search-btn').click() - await expect(page.locator('#code-examples').getByText('Matches displayed: 0')).toBeVisible() - await expect( - page.locator('#code-examples').getByText('Sorry, there is no result for should be no results') - ).toBeVisible() -}) - test('hovercards', async ({ page }) => { await page.goto('/pages/quickstart') From 31563228fd8571d5909d00c2c30f3192c874782f Mon Sep 17 00:00:00 2001 From: docubot <67483024+docubot@users.noreply.github.com> Date: Thu, 20 Apr 2023 08:17:10 -0700 Subject: [PATCH 3/3] [Ready to ship] Update CodeQL CLI manual to 2.13.0 (#36422) Co-authored-by: Felicity Chapman --- .../database-add-diagnostic.md | 2 ++ .../codeql-cli-manual/database-analyze.md | 8 +++--- .../database-export-diagnostics.md | 2 ++ .../codeql-cli-manual/database-index-files.md | 2 ++ .../codeql-cli-manual/database-run-queries.md | 8 +++--- .../codeql-cli-manual/diagnostic-add.md | 2 ++ .../codeql-cli-manual/diagnostic-export.md | 2 ++ .../codeql-cli-manual/execute-queries.md | 8 +++--- .../execute-query-server2.md | 2 ++ .../codeql-cli/codeql-cli-manual/pack-add.md | 22 +++++++++++++--- .../codeql-cli-manual/pack-bundle.md | 2 ++ .../codeql-cli/codeql-cli-manual/pack-ci.md | 9 +++++++ .../codeql-cli-manual/pack-create.md | 2 ++ .../codeql-cli-manual/pack-download.md | 4 +++ .../codeql-cli/codeql-cli-manual/pack-init.md | 2 ++ .../codeql-cli-manual/pack-install.md | 9 +++++++ .../codeql-cli/codeql-cli-manual/pack-ls.md | 2 ++ .../codeql-cli-manual/pack-packlist.md | 2 ++ .../codeql-cli-manual/pack-publish.md | 4 +++ .../pack-resolve-dependencies.md | 9 +++++++ .../codeql-cli-manual/pack-upgrade.md | 9 +++++++ .../codeql-cli-manual/query-compile.md | 10 +++++--- .../codeql-cli/codeql-cli-manual/query-run.md | 8 +++--- .../codeql-cli-manual/resolve-files.md | 2 ++ .../codeql-cli/codeql-cli-manual/test-run.md | 25 +++++++++++++++++++ 25 files changed, 133 insertions(+), 24 deletions(-) diff --git a/content/code-security/codeql-cli/codeql-cli-manual/database-add-diagnostic.md b/content/code-security/codeql-cli/codeql-cli-manual/database-add-diagnostic.md index 9e1e7bec62..ebe3f7f638 100644 --- a/content/code-security/codeql-cli/codeql-cli-manual/database-add-diagnostic.md +++ b/content/code-security/codeql-cli/codeql-cli-manual/database-add-diagnostic.md @@ -30,6 +30,8 @@ codeql database add-diagnostic --source-id= --source-name= .. \[Experimental] Add a piece of diagnostic information to a database. +Available since `v2.12.6`. + ## Primary options #### `` diff --git a/content/code-security/codeql-cli/codeql-cli-manual/database-analyze.md b/content/code-security/codeql-cli/codeql-cli-manual/database-analyze.md index cc3de4f42f..7fd9f1eb97 100644 --- a/content/code-security/codeql-cli/codeql-cli-manual/database-analyze.md +++ b/content/code-security/codeql-cli/codeql-cli-manual/database-analyze.md @@ -334,9 +334,9 @@ How to handle warnings from the QL compiler. One of: `error`: Treat warnings as errors. -#### `--[no-]debug-info` +#### `--no-debug-info` -Emit source location info in RA for debugging. +Don't emit source location info in RA for debugging. #### `--[no-]fast-compilation` @@ -361,9 +361,9 @@ improvements in the compiler early. In releases where there are no recent improvements to enable, this option silently does nothing. Thus it is safe to set it once and for all -in you global CodeQL config file. +in your global CodeQL config file. -The newest features are always on by default in [codeql test run](/code-security/codeql-cli/codeql-cli-manual/test-run). +Available since `v2.11.1`. #### `--[no-]local-checking` diff --git a/content/code-security/codeql-cli/codeql-cli-manual/database-export-diagnostics.md b/content/code-security/codeql-cli/codeql-cli-manual/database-export-diagnostics.md index 04420d109c..f786e13946 100644 --- a/content/code-security/codeql-cli/codeql-cli-manual/database-export-diagnostics.md +++ b/content/code-security/codeql-cli/codeql-cli-manual/database-export-diagnostics.md @@ -33,6 +33,8 @@ codeql database export-diagnostics --format= [--output=]