From e154a557a855d08093d947a8af487691b37d493b Mon Sep 17 00:00:00 2001 From: Patrick Knight Date: Mon, 10 Feb 2025 09:42:44 -0600 Subject: [PATCH 1/6] Update detaching-a-fork.md (#53942) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kevin Heis Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com> Co-authored-by: Zachariah Cox --- .../working-with-forks/detaching-a-fork.md | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/content/pull-requests/collaborating-with-pull-requests/working-with-forks/detaching-a-fork.md b/content/pull-requests/collaborating-with-pull-requests/working-with-forks/detaching-a-fork.md index 39d861dea781..23c7cc594e67 100644 --- a/content/pull-requests/collaborating-with-pull-requests/working-with-forks/detaching-a-fork.md +++ b/content/pull-requests/collaborating-with-pull-requests/working-with-forks/detaching-a-fork.md @@ -1,6 +1,6 @@ --- title: Detaching a fork -intro: You can delete a fork and recreate the same repository, without the connection to the original network. +intro: You can disconnect a repository from its fork network by leaving the network or manually deleting the fork and recreating it without any connection to the original. versions: fpt: '*' ghes: '*' @@ -10,15 +10,14 @@ topics: permissions: People with admin access for a forked repository can delete the forked repository. --- -## About detaching forks +## Converting a fork into a standalone repository -To turn your fork into a standalone repository, you can clone the fork, use the clone to create a new repository, and then delete the fork. This is useful when you want to take the work you are doing in a different direction or maintain distinct versions. +To turn your fork into a standalone repository, you can leave the fork network ensuring the new repository will no longer automatically sync with changes from the original repository. This is useful when you want to take the work you are doing in a different direction or maintain distinct versions. -The new repository will no longer automatically sync with changes from the original repository. - -> [!NOTE] +> [!WARNING] > * The new repository will not retain any of its issues, pull requests, wikis, stars, watchers, comments, child forks, or other metadata that may currently be associated with your current fork. > * All git commit metadata will be preserved. Commits may become eligible to be counted as contributions if they meet certain criteria. For more information, see [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account). +> * Leaving the fork network is **permanent** and the new repository **cannot** be reconnected to the fork network. {% ifversion ghes %} @@ -27,9 +26,25 @@ The new repository will no longer automatically sync with changes from the origi {% endif %} -## Detaching a fork +## Leaving the fork network + +You can only detach forks with the leave network option when: +* The fork is public +* The fork is less than 1GB +* The fork does not have any child forks attached + +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.sidebar-settings %} +1. On the "General" settings page (which is selected by default), scroll down to the "Danger Zone" section, and click **Leave fork network**. +1. Read the warnings and click **I have read and understand these effects**. +1. To verify that you're deleting the correct repository, in the text box, type the name of the fork. +1. Click **Leave fork network**. + +While the fork is being detached, some operations will be briefly unavailable until the fork has been transitioned to a standalone repository. + +## Manually Leaving the fork network -You can delete a fork and recreate the same repository, without the connection to the original network. +To turn your fork into a standalone repository, you can clone the fork, use the clone to create a new repository, and then delete the fork removing the connection to the original network. {% data reusables.command_line.open_the_multi_os_terminal %} 1. Create a bare clone of the fork. From fbb550a1285e1063cac32209f7f8e7506d618c70 Mon Sep 17 00:00:00 2001 From: Ben Ahmady <32935794+subatoi@users.noreply.github.com> Date: Mon, 10 Feb 2025 15:55:50 +0000 Subject: [PATCH 2/6] Dependency graph has to be enabled manually for public forks (#54296) Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- ...evels-for-a-personal-account-repository.md | 2 +- ...quickstart-for-securing-your-repository.md | 2 +- .../about-supply-chain-security.md | 4 +-- .../configuring-the-dependency-graph.md | 25 +++++++------------ ...-dependency-review-action-configuration.md | 2 +- ...loring-the-dependencies-of-a-repository.md | 4 +-- ...ng-dependency-changes-in-a-pull-request.md | 2 +- ...endency-graph-private-repo-public-fork.md} | 2 +- 8 files changed, 18 insertions(+), 25 deletions(-) rename data/reusables/dependabot/{enabling-disabling-dependency-graph-private-repo.md => enabling-disabling-dependency-graph-private-repo-public-fork.md} (98%) diff --git a/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/permission-levels-for-a-personal-account-repository.md b/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/permission-levels-for-a-personal-account-repository.md index 233cacb4ee01..a72e45960c6c 100644 --- a/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/permission-levels-for-a-personal-account-repository.md +++ b/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/permission-levels-for-a-personal-account-repository.md @@ -43,7 +43,7 @@ The repository owner has full control of the repository. In addition to the acti | Manage security and analysis settings for the repository | [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository) | | {% endif %} | | {% ifversion fpt or ghec %} | -| Enable the dependency graph for a private repository | [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository) | +| Enable the dependency graph for a private {% ifversion ghec %}or internal {% endif %}repository, or public fork | [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph) | | {% endif %} | | Delete and restore packages | [AUTOTITLE](/packages/learn-github-packages/deleting-and-restoring-a-package) | | Customize the repository's social media preview | [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/customizing-your-repositorys-social-media-preview) | diff --git a/content/code-security/getting-started/quickstart-for-securing-your-repository.md b/content/code-security/getting-started/quickstart-for-securing-your-repository.md index 606ba9d7b202..8c2600262c83 100644 --- a/content/code-security/getting-started/quickstart-for-securing-your-repository.md +++ b/content/code-security/getting-started/quickstart-for-securing-your-repository.md @@ -48,7 +48,7 @@ From the main page of your repository, click **{% octicon "gear" aria-hidden="tr {% data reusables.dependabot.dependabot-alerts-dependency-graph-enterprise %} -For more information, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository). +For more information, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph). ## Managing {% data variables.product.prodname_dependabot_alerts %} diff --git a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security.md b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security.md index 494fb45328ad..ae9732656b8f 100644 --- a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security.md +++ b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security.md @@ -145,11 +145,11 @@ Public repositories: You can also enable or disable Dependabot alerts for all repositories owned by your user account or organization. For more information, see [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account) or [AUTOTITLE](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization). Private repositories: -* **Dependency graph:** Not enabled by default. The feature can be enabled by repository administrators. For more information, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository). +* **Dependency graph:** Not enabled by default. The feature can be enabled by repository administrators. For more information, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph). {% ifversion fpt %} * **Dependency review:** Available in private repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review). {% elsif ghec %} -* **Dependency review:** Available in private repositories owned by organizations provided you have a license for {% data variables.product.prodname_GH_advanced_security %} and the dependency graph enabled. For more information, see [AUTOTITLE](/get-started/learning-about-github/about-github-advanced-security) and [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository). +* **Dependency review:** Available in private repositories owned by organizations provided you have a license for {% data variables.product.prodname_GH_advanced_security %} and the dependency graph enabled. For more information, see [AUTOTITLE](/get-started/learning-about-github/about-github-advanced-security) and [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph). {% endif %} * **{% data variables.product.prodname_dependabot_alerts %}:** Not enabled by default. Owners of private repositories, or people with admin access, can enable {% data variables.product.prodname_dependabot_alerts %} by enabling the dependency graph and {% data variables.product.prodname_dependabot_alerts %} for their repositories. You can also enable or disable Dependabot alerts for all repositories owned by your user account or organization. For more information, see [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account) or [AUTOTITLE](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization). diff --git a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md index 4276c4cdfb7c..33683c9da723 100644 --- a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md +++ b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md @@ -21,32 +21,25 @@ shortTitle: Configure dependency graph For more information, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph). -{% ifversion fpt or ghec %} - -## Configuring the dependency graph +{% ifversion ghes %} -To generate a dependency graph, {% data variables.product.github %} needs read-only access to the dependency manifest and lock files for a repository. The dependency graph is automatically generated for all public repositories and you can choose to enable it for private {% ifversion ghec %}and internal {% endif %}repositories. For more information on viewing the dependency graph, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository). +## Enabling the dependency graph -{% data reusables.dependency-submission.dependency-submission-link %} +{% data reusables.dependabot.ghes-enabling-dependency-graph %} {% endif %} -{% ifversion ghes %} - -## Enabling the dependency graph - -{% data reusables.dependabot.ghes-enabling-dependency-graph %}{% endif %} +{% ifversion fpt or ghec %} -{% ifversion ghec %} +## Configuring the dependency graph -### Enabling and disabling the dependency graph for a private or internal repository +To generate a dependency graph, {% data variables.product.github %} needs read-only access to the dependency manifest and lock files for a repository. The dependency graph is automatically generated for all public repositories and you can choose to enable it for private {% ifversion ghec %}and internal {% endif %}repositories, and public forks. For more information on viewing the dependency graph, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository). -{% endif %}{% ifversion fpt %} +{% data reusables.dependency-submission.dependency-submission-link %} -### Enabling and disabling the dependency graph for a private repository +### Enabling and disabling the dependency graph -{% endif %}{% ifversion fpt or ghec %} -{% data reusables.dependabot.enabling-disabling-dependency-graph-private-repo %} +{% data reusables.dependabot.enabling-disabling-dependency-graph-private-repo-public-fork %} {% endif %} diff --git a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/customizing-your-dependency-review-action-configuration.md b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/customizing-your-dependency-review-action-configuration.md index 4a198d5cb9ca..b2ee72c51fda 100644 --- a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/customizing-your-dependency-review-action-configuration.md +++ b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/customizing-your-dependency-review-action-configuration.md @@ -24,7 +24,7 @@ This guide shows you how to add three very common customizations: failing builds This guide assumes that: -* Dependency graph is enabled for the repository.{% ifversion fpt or ghec %} Dependency graph is enabled by default for public repositories and you can choose to enable it for private repositories.{% endif %} For more information, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph#enabling-and-disabling-the-dependency-graph-for-a-private-repository). +* Dependency graph is enabled for the repository.{% ifversion fpt or ghec %} Dependency graph is enabled by default for public repositories and you can choose to enable it for private{% ifversion ghec %} and internal{% endif %} repositories, and public forks.{% endif %} For more information, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph#enabling-and-disabling-the-dependency-graph-for-a-private-repository). * {% data variables.product.prodname_actions %} is enabled for the repository. For more information, see [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository). ## Step 1: Adding the dependency review action diff --git a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository.md b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository.md index 899b6de82599..7dcab53227e1 100644 --- a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository.md +++ b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository.md @@ -77,9 +77,9 @@ If vulnerabilities have been detected in the repository, these are shown at the For public repositories, the dependents view shows how the repository is used by other repositories. To show only the repositories that contain a library in a package manager, click **NUMBER Packages** immediately above the list of dependent repositories. The dependent counts are approximate and may not always match the dependents listed. -## Enabling and disabling the dependency graph for a private repository +## Enabling and disabling the dependency graph -{% data reusables.dependabot.enabling-disabling-dependency-graph-private-repo %} +{% data reusables.dependabot.enabling-disabling-dependency-graph-private-repo-public-fork %} ## Changing the "Used by" package diff --git a/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md b/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md index 01d4142f4182..57fbf7f7523d 100644 --- a/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md +++ b/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md @@ -25,7 +25,7 @@ shortTitle: Review dependency changes {% data reusables.dependency-review.feature-overview %} -{% ifversion ghec %}Before you can use dependency review in a private repository, you must enable the dependency graph. For more information, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository).{% endif %} +{% ifversion ghec %}Before you can use dependency review in a private or internal repository, or a public fork, you must enable the dependency graph. For more information, see [AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph).{% endif %} {% ifversion ghes %}Before you can use dependency review, you must enable the dependency graph and connect {% data variables.location.product_location %} to {% data variables.product.prodname_dotcom_the_website %}. For more information, see [AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise).{% endif %} diff --git a/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo.md b/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo-public-fork.md similarity index 98% rename from data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo.md rename to data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo-public-fork.md index b4e63f0cc96b..e26b0c8b4acd 100644 --- a/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo.md +++ b/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo-public-fork.md @@ -1,4 +1,4 @@ -Repository administrators can enable or disable the dependency graph for private {% ifversion ghec %}or internal{% endif %} repositories. +Repository administrators can enable or disable the dependency graph for private {% ifversion ghec %}or internal{% endif %} repositories, or public forks. You can enable or disable the dependency graph for all repositories owned by your user account. For more information, see [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/managing-security-and-analysis-settings-for-your-personal-account). From d1c574383efabf12f0b559b7432590059cc3b032 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 11:29:46 -0500 Subject: [PATCH 3/6] Bump github/gh-base-image/gh-base-noble from 20250130-211232-g78f3af16c to 20250131-172559-g0fd5a2edc in the baseimages group (#54292) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b8b14e6d1fb0..b228d90113b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------------- # To update the sha: # https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble -FROM ghcr.io/github/gh-base-image/gh-base-noble:20250130-211232-g78f3af16c AS base +FROM ghcr.io/github/gh-base-image/gh-base-noble:20250131-172559-g0fd5a2edc AS base # Install git for cloning docs-early-access & translations repos # Install curl for determining the early access branch From e1c0c5b55dd9b985c0d1b44907791517f3619ae3 Mon Sep 17 00:00:00 2001 From: docs-bot <77750099+docs-bot@users.noreply.github.com> Date: Mon, 10 Feb 2025 12:01:01 -0500 Subject: [PATCH 4/6] Delete orphaned features (2025-02-10-16-28) (#54333) Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com> --- data/features/actions-server-statistics.yml | 2 -- data/features/actions-setup-go-default-cache-enabled.yml | 6 ------ data/features/actions-single-use-tokens.yml | 6 ------ data/features/actions-token-updated-triggers.yml | 6 ------ data/features/actions-unified-inputs.yml | 5 ----- 5 files changed, 25 deletions(-) delete mode 100644 data/features/actions-server-statistics.yml delete mode 100644 data/features/actions-setup-go-default-cache-enabled.yml delete mode 100644 data/features/actions-single-use-tokens.yml delete mode 100644 data/features/actions-token-updated-triggers.yml delete mode 100644 data/features/actions-unified-inputs.yml diff --git a/data/features/actions-server-statistics.yml b/data/features/actions-server-statistics.yml deleted file mode 100644 index c40969b23803..000000000000 --- a/data/features/actions-server-statistics.yml +++ /dev/null @@ -1,2 +0,0 @@ -versions: - ghes: '>=3.9' diff --git a/data/features/actions-setup-go-default-cache-enabled.yml b/data/features/actions-setup-go-default-cache-enabled.yml deleted file mode 100644 index 16830ef4881e..000000000000 --- a/data/features/actions-setup-go-default-cache-enabled.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Reference: #9131 -# Setup-Go Action now enabled with caching by default -versions: - fpt: '*' - ghec: '*' - ghes: '>=3.9' diff --git a/data/features/actions-single-use-tokens.yml b/data/features/actions-single-use-tokens.yml deleted file mode 100644 index d31b8e08f300..000000000000 --- a/data/features/actions-single-use-tokens.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Issue 9102 and a Hubber-contribution PR /docs-internal/pull/36758 -# Documentation for single-use registration tokens and just-in-time runners -versions: - fpt: '*' - ghec: '*' - ghes: '>=3.10' diff --git a/data/features/actions-token-updated-triggers.yml b/data/features/actions-token-updated-triggers.yml deleted file mode 100644 index d10a3936f414..000000000000 --- a/data/features/actions-token-updated-triggers.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Reference: #7987 -# Allow customers to trigger workflow_dispatch and repository_dispatch with GITHUB_TOKEN -versions: - fpt: '*' - ghec: '*' - ghes: '> 3.7' diff --git a/data/features/actions-unified-inputs.yml b/data/features/actions-unified-inputs.yml deleted file mode 100644 index 079fabab3dcb..000000000000 --- a/data/features/actions-unified-inputs.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Issue 6921 -versions: - fpt: '*' - ghec: '*' - ghes: '>=3.6' From 3db10d2db419ba3593661f2b7525e029b8207ae5 Mon Sep 17 00:00:00 2001 From: docs-bot <77750099+docs-bot@users.noreply.github.com> Date: Mon, 10 Feb 2025 12:02:50 -0500 Subject: [PATCH 5/6] Delete orphaned files (2025-02-10-16-34) (#54334) Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com> --- data/reusables/copilot/ai-models-intro.md | 5 -- .../copilot-chat-models-list-o1-preview.md | 15 ----- ...i-models-into-your-development-workflow.md | 64 ------------------- .../view-configurations-page-enterprise.md | 1 - 4 files changed, 85 deletions(-) delete mode 100644 data/reusables/copilot/ai-models-intro.md delete mode 100644 data/reusables/copilot/copilot-chat-models-list-o1-preview.md delete mode 100644 data/reusables/copilot/integrating-ai-models-into-your-development-workflow.md delete mode 100644 data/reusables/security-configurations/view-configurations-page-enterprise.md diff --git a/data/reusables/copilot/ai-models-intro.md b/data/reusables/copilot/ai-models-intro.md deleted file mode 100644 index 8a84af2193f2..000000000000 --- a/data/reusables/copilot/ai-models-intro.md +++ /dev/null @@ -1,5 +0,0 @@ -{% data variables.product.prodname_copilot_chat_short %} uses the GPT 4o model by default. Depending on the task you are working on, you may want to use a different model, such as the {% data variables.copilot.copilot_claude_sonnet %} model or the o1 model. For a list of all AI models currently available to {% data variables.product.prodname_copilot_chat_short %}, and the advantages and limitations of each model, see [AUTOTITLE](/copilot/using-github-copilot/github-copilot-chat-cheat-sheet?#ai-models). - -For more information about the o1 models, see [Models](https://platform.openai.com/docs/models/models) in the OpenAI Platform documentation. - -For more information about the {% data variables.copilot.copilot_claude_sonnet %} model from Anthropic, see [AUTOTITLE](/copilot/using-github-copilot/using-claude-sonnet-in-github-copilot). diff --git a/data/reusables/copilot/copilot-chat-models-list-o1-preview.md b/data/reusables/copilot/copilot-chat-models-list-o1-preview.md deleted file mode 100644 index e84fe492519c..000000000000 --- a/data/reusables/copilot/copilot-chat-models-list-o1-preview.md +++ /dev/null @@ -1,15 +0,0 @@ -Below is a list of all currently available AI models for using {% data variables.product.prodname_copilot_chat_short %}, and the advantages and limitations of each model. For information on how to change your AI model, see [Changing your AI model](/copilot/using-github-copilot/asking-github-copilot-questions-in-github#changing-your-ai-model). - -| Model | Description | Hosting Platform | -|---------------------|---------------|---------------------------| -| GPT 4o | This is the default {% data variables.product.prodname_copilot_chat_short %} model. It is a versatile, multimodal model that excels in both text and image processing and is designed to provide fast, reliable responses. It also has superior performance in non-English languages. Learn more about the [model's capabilities](https://platform.openai.com/docs/models/gpt-4o) and review the [model card](https://openai.com/index/gpt-4o-system-card/). | Azure | -| Claude 3.5 Sonnet | This model excels at coding tasks across the entire software development lifecycle, from initial design to bug fixes, maintenance to optimizations. Learn more about the [model's capabilities](https://www.anthropic.com/claude/sonnet) or read the [model card](https://assets.anthropic.com/m/61e7d27f8c8f5919/original/Claude-3-Model-Card.pdf). | Amazon Web Services | -| o1-preview | This model is focused on advanced reasoning and solving complex problems, in particular in math and science. It responds more slowly than the `gpt-4o` model. You can make 10 requests to this model per day. Learn more about the [model's capabilities](https://platform.openai.com/docs/models/o1) and review the [model card](https://openai.com/index/openai-o1-system-card/). | Azure | -| o1-mini | This is the faster version of the `o1-preview` model, balancing the use of complex reasoning with the need for faster responses. It is best suited for code generation and small context operations. You can make 50 requests to this model per day. Learn more about the [model's capabilities](https://platform.openai.com/docs/models/o1) and review the [model card](https://openai.com/index/openai-o1-system-card/). | Azure | - -> [!NOTE] -> Support for the `o1` model, replacing `o1-preview`, is coming soon to {% data variables.product.prodname_vs %}. - -For more information about the o1 models, see [Models](https://platform.openai.com/docs/models/models) in the OpenAI Platform documentation. - -For more information about the {% data variables.copilot.copilot_claude_sonnet %} model from Anthropic, see [AUTOTITLE](/copilot/using-github-copilot/using-claude-sonnet-in-github-copilot). diff --git a/data/reusables/copilot/integrating-ai-models-into-your-development-workflow.md b/data/reusables/copilot/integrating-ai-models-into-your-development-workflow.md deleted file mode 100644 index 28e5d811cca8..000000000000 --- a/data/reusables/copilot/integrating-ai-models-into-your-development-workflow.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Integrating AI models into your development workflow -intro: 'Call AI models in the tools you use every day.' -versions: - feature: github-models -shortTitle: Integrate AI models ---- - -With {% data variables.product.prodname_github_models %} extensions, you can call specific AI models from both {% data variables.product.prodname_copilot_chat_short %} and {% data variables.product.prodname_cli %}. These extensions integrate directly into your development workflow, allowing you to prompt models without context switching. - -## Using AI models in {% data variables.product.prodname_copilot_chat_short %} - -If you have a {% data variables.product.prodname_copilot_short %} subscription, you can work with AI models in {% data variables.product.prodname_copilot_chat_short %} in two different ways: -* Using the {% data variables.product.prodname_github_models %} {% data variables.product.prodname_copilot_extension_short %}. With this extension, you can ask for model recommendations based on certain criteria and chat with specific models. See [Using the {% data variables.product.prodname_github_models %} {% data variables.product.prodname_copilot_extension_short %}](#using-the-github-models-copilot-extension). -* Using multiple model support in {% data variables.product.prodname_copilot_chat_short %}. With multi-model {% data variables.product.prodname_copilot_chat_short %}, you can choose a specific model to use for a conversation, then prompt {% data variables.product.prodname_copilot_chat_short %} as usual. See [AUTOTITLE](/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-chat). - -### Using the {% data variables.product.prodname_github_models %} {% data variables.product.prodname_copilot_extension_short %} - -> [!NOTE] The {% data variables.product.prodname_github_models %} {% data variables.product.prodname_copilot_extension_short %} is in {% data variables.release-phases.public_preview %} and is subject to change. - -1. Install the [{% data variables.product.prodname_github_models %} {% data variables.product.prodname_copilot_extension_short %}](https://github.com/marketplace/models-github). - * If you have a {% data variables.product.prodname_copilot_pro_short %} subscription, you can install the extension on your personal account. - * If you have access to {% data variables.product.prodname_copilot_short %} through a {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription: - * An organization owner or enterprise owner needs to enable the {% data variables.product.prodname_copilot_extensions_short %} policy for your organization or enterprise. - * An organization owner needs to install the extension for your organization. - -1. Open any implementation of {% data variables.product.prodname_copilot_chat_short %} that supports {% data variables.product.prodname_copilot_extensions %}. For a list of supported {% data variables.product.prodname_copilot_chat_short %} implementations, see [AUTOTITLE](/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat#supported-clients-and-ides). -1. In the chat window, type `@models YOUR-PROMPT`, then send your prompt. There are several use cases for the {% data variables.product.prodname_github_models %} {% data variables.product.prodname_copilot_extension_short %}, including: - * Recommending a particular model based on context and criteria you provide. For example, you can ask for a low-cost OpenAI model that supports function calling. - * Executing prompts using a particular model. This is especially useful when you want to use a model that is not currently available in multi-model {% data variables.product.prodname_copilot_chat_short %}. - * Listing models currently available through {% data variables.product.prodname_github_models %} - -## Using AI models from the command line - -> [!NOTE] The {% data variables.product.prodname_github_models %} extension for {% data variables.product.prodname_cli %} is in {% data variables.release-phases.public_preview %} and is subject to change. - -You can use the {% data variables.product.prodname_github_models %} extension for {% data variables.product.prodname_cli %} to prompt AI models from the command line, and even pipe in the output of a command as context. - -### Prerequisites - -To use the {% data variables.product.prodname_github_models %} CLI extension, you need to have {% data variables.product.prodname_cli %} installed. {% data reusables.cli.cli-installation %} - -### Installing the extension - -1. If you have not already authenticated to the {% data variables.product.prodname_cli %}, run the following command in your terminal. - - ```shell copy - gh auth login - ``` - -1. To install the {% data variables.product.prodname_github_models %} extension, run the following command. - - ```shell copy - gh extension install https://github.com/github/gh-models - ``` - -### Using the extension - -To see a list of all available commands, run `gh models`. - -There are a few key ways you can use the extension: - * **To ask a model multiple questions using a chat experience**, run `gh models run`. Select your model from the listed models, then send your prompts. - * **To ask a model a single question**, run `gh models run MODEL-NAME "QUESTION"` in your terminal. For example, to ask the GPT 4o model why the sky is blue, you can run `gh models run GPT-4o "why is the sky blue?"`. - * **To provide the output of a command as context when you call a model**, you can join a separate command and the call to the model with the pipe character (`|`). For example, to summarize the README file in the current directory using the GPT 4o model, you can run `cat README.md | gh models run GPT-4o "summarize this text"`. diff --git a/data/reusables/security-configurations/view-configurations-page-enterprise.md b/data/reusables/security-configurations/view-configurations-page-enterprise.md deleted file mode 100644 index 160841ed6ae0..000000000000 --- a/data/reusables/security-configurations/view-configurations-page-enterprise.md +++ /dev/null @@ -1 +0,0 @@ -1. Under "Settings", select the {% ifversion ghec %}**Code security**{% else %}**Code security and analysis**{% endif %} dropdown menu. From dfe64ef4f581ae1c893dff0f0d4aeff34a251260 Mon Sep 17 00:00:00 2001 From: Evan Bonsignori Date: Mon, 10 Feb 2025 10:07:08 -0800 Subject: [PATCH 6/6] lessen the stress to our backend from the api/cookies call (#54324) Co-authored-by: Hector Alfaro --- src/events/components/dotcom-cookies.ts | 59 ++++++++++++++++--------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/src/events/components/dotcom-cookies.ts b/src/events/components/dotcom-cookies.ts index 4f8decc768eb..d92f7288ef51 100644 --- a/src/events/components/dotcom-cookies.ts +++ b/src/events/components/dotcom-cookies.ts @@ -8,37 +8,42 @@ type DotcomCookies = { let cachedCookies: DotcomCookies | null = null let inFlightPromise: Promise | null = null -let tries = 0 const GET_COOKIES_ENDPOINT = '/api/cookies' -const MAX_TRIES = 3 +const LOCAL_STORAGE_KEY = 'dotcomCookies' -// Fetches httpOnly cookies from the server and cache the result -// We use an in-flight promise to avoid duplicate requests +// Fetches httpOnly cookies from the server and caches the result. +// We don't want to do this every time because of the load it would place on our servers +// So on success, the data is stored in local storage and reused on subsequent loads +// On failure, returns default empty values +// If a user is staff and they didn't happen to be logged in when these cookies were saved, +// we can instruct them as needed to update the cookies and correctly set the isStaff flag. async function fetchCookies(): Promise { + // Return the cached object if we have it in memory. if (cachedCookies) { return cachedCookies } - // If request is already in progress, return the same promise - if (inFlightPromise) { - return inFlightPromise - } - - if (tries > MAX_TRIES) { - // In prod, fail without a serious error - console.error('Failed to fetch cookies after 3 tries') - // In dev, be loud about the issue - if (process.env.NODE_ENV === 'development') { - throw new Error('Failed to fetch cookies after 3 tries') + // Try to load from local storage. + const storedCookies = localStorage.getItem(LOCAL_STORAGE_KEY) + if (storedCookies) { + try { + cachedCookies = JSON.parse(storedCookies) as DotcomCookies + return cachedCookies + } catch (e) { + console.error('Error parsing cookies from local storage:', e) + localStorage.removeItem(LOCAL_STORAGE_KEY) } + } - return Promise.resolve({}) + // If a request is already in progress, reuse it. + if (inFlightPromise) { + return inFlightPromise } + // Make a single fetch request to the backend. inFlightPromise = fetch(GET_COOKIES_ENDPOINT) .then((response) => { - tries++ if (!response.ok) { throw new Error(`Failed to fetch cookies: ${response.statusText}`) } @@ -46,12 +51,26 @@ async function fetchCookies(): Promise { }) .then((data) => { cachedCookies = data + // Store the fetched cookies in local storage for future use. + try { + localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(data)) + } catch (e) { + console.error('Error storing cookies in local storage:', e) + } return data }) + .catch((err) => { + console.error('Error fetching cookies:', err) + // On failure, return default values. + const defaultCookies: DotcomCookies = { + dotcomUsername: '', + isStaff: false, + } + cachedCookies = defaultCookies + return defaultCookies + }) .finally(() => { - // Clear the in-flight promise regardless of success or failure - // On success, subsequent calls will return the cached value - // On failure, subsequent calls will retry the request up to MAX_TRIES times + // Clear the in-flight promise regardless of success or failure. inFlightPromise = null })