Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo sync #35129

Merged
merged 14 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ topics:

Using {% data variables.product.prodname_actions %} runners allows you to more easily identify {% data variables.product.prodname_dependabot %} job errors and manually detect and troubleshoot failed runs. You can also integrate {% data variables.product.prodname_dependabot %} into your CI/CD pipelines by using {% data variables.product.prodname_actions %} APIs and webhooks to detect {% data variables.product.prodname_dependabot %} job status such as failed runs, and perform downstream processing. For more information, see "[AUTOTITLE](/rest/actions)" and "[AUTOTITLE](/webhooks/webhook-events-and-payloads)."

>[!TIP] Running {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_dotcom %}-hosted and self-hosted runners **does not** count towards your included {% data variables.product.prodname_actions %} minutes. For more information, see "[AUTOTITLE](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)."

You can run {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_actions %} using:
* {% data variables.product.prodname_dotcom %}-hosted runners
* {% data variables.actions.hosted_runners_caps %}. These runners are {% data variables.product.prodname_dotcom %}-hosted, with advanced features, such as more RAM, CPU, and disk space. For more information, see "[AUTOTITLE](/actions/using-github-hosted-runners/about-larger-runners)."
* Self-hosted runners

Using private networking with either an Azure Virtual Network (VNET) or Actions Runner Controller (ARC) is not supported.

>[!TIP] Running {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_dotcom %}-hosted and self-hosted runners **does not** count towards your included {% data variables.product.prodname_actions %} minutes. For more information, see "[AUTOTITLE](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)."
{% data reusables.dependabot.vnet-arc-note %}

Enabling {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_actions %} may increase the number of concurrent jobs run in your account. If required, customers on enterprise plans can request a higher limit for concurrent jobs. For more information, contact us through the {% data variables.contact.contact_support_portal %}, or contact your sales representative.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ topics:

You can help users of your organization and repositories to create and maintain secure code by setting up {% data variables.product.prodname_dependabot %} security and version updates. With {% data variables.product.prodname_dependabot_updates %}, developers can configure repositories so that their dependencies are updated and kept secure automatically. Running {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_actions %} allows for better performance, and increased visibility and control of {% data variables.product.prodname_dependabot %} jobs.

{% data reusables.dependabot.vnet-arc-note %}

To have greater control over {% data variables.product.prodname_dependabot %} access to your private registries and internal network resources, you can configure {% data variables.product.prodname_dependabot %} to run on {% data variables.product.prodname_actions %} self-hosted runners.

For security reasons, when running {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_actions %} self-hosted runners, {% data variables.product.prodname_dependabot_updates %} will not be run on public repositories.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ If you have a seat on the {% data variables.product.prodname_copilot_enterprise_
{% endif %}

{% ifversion ghec or fpt %}
If you have a seat on the {% data variables.product.prodname_copilot_business_short %} (CB) plan, you are subject to the indexing limit for your organization. You cannot index additional repositories once your organization reaches the repository limit, but you can still benefit from the indexes created by other users.
If you have a seat on the {% data variables.product.prodname_copilot_business_short %} (CB) plan, you are subject to the indexing limit for your organization. Additionally, you can only index repositories that belong to the GitHub organization that assigned your Copilot seat. You cannot index additional repositories once your organization reaches the repository limit, but you can still benefit from the indexes created by other users.
{% endif %}

{% ifversion fpt %}
If you have a {% data variables.product.prodname_copilot_individuals_short %} (CI) plan, you are subject to an indexing limit and can index any repository that you belong to. However, you can still benefit from the indexes created by other users without affecting your limit.
If you have a {% data variables.product.prodname_copilot_individuals_short %} (CI) plan, you are subject to an indexing limit and can index any repository that you have access to. However, you can still benefit from the indexes created by other users without affecting your limit.
{% endif %}

Both CE and CB plans can apply content exclusions to control the behavior of {% data variables.product.prodname_copilot %} for the {% data variables.product.prodname_copilot_short %} seats they manage. For more information, see "[AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/excluding-content-from-github-copilot)." However, CI users can still index any repository they have access to, regardless of the content exclusion policies set by the organization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ In addition to the configuration for the {% data variables.product.prodname_copi

Your personal settings for {% data variables.product.prodname_copilot %} include an option to either allow or block code suggestions that match publicly available code. If you choose to block suggestions matching public code, {% data variables.product.prodname_copilot %} checks code suggestions with their surrounding code of about 150 characters against public code on {% data variables.product.prodname_dotcom %}. If there is a match, or a near match, the suggestion is not shown to you.

If you choose to allow suggestions matching public code, and you accept a suggestion for which one or more matches were found, you can click through from an entry in the {% data variables.product.prodname_copilot %} log to view a list of references on {% data variables.product.prodname_dotcom %}. For more information, see "[AUTOTITLE](/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions)."
If you choose to allow suggestions matching public code, when {% data variables.product.prodname_copilot_short %} suggests matching code you can display details of the matches and click through to the relevant repositories on {% data variables.product.prodname_dotcom %}. For more information, see "[AUTOTITLE](/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions)."

{% data reusables.user-settings.copilot-settings %}
1. To the right of **Suggestions matching public code**, select the dropdown menu, then click **Allow** to allow suggestions matching public code, or **Block** to block suggestions matching public code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ Depending on factors such as your codebase and input data, you may experience di

### Matches with public code

{% data variables.product.prodname_copilot_chat_short %} is capable of generating new code, which it does in a probabilistic way. While the probability that it may produce code that matches code in the training set is low, a {% data variables.product.prodname_copilot_chat_short %} suggestion may contain some code snippets that match code in the training set. {% data variables.product.prodname_copilot_chat_short %} utilizes filters that block matches with public code on {% data variables.product.prodname_dotcom %} repositories, but you should always take the same precautions as you would with any code you write that uses material you did not independently originate, including precautions to ensure its suitability. These include rigorous testing, IP scanning, and checking for security vulnerabilities.
{% data variables.product.prodname_copilot_chat_short %} is capable of generating new code, which it does in a probabilistic way. While the probability that it may produce code that matches code in the training set is low, a {% data variables.product.prodname_copilot_chat_short %} suggestion may contain some code snippets that match code in the training set.

If you have disabled suggestions that match public code then {% data variables.product.prodname_copilot_chat_short %} utilizes filters that prevent it from showing code that matches code found in public repositories on {% data variables.product.prodname_dotcom %}. However, you should always take the same precautions as you would with any code you write that uses material you did not independently originate, including precautions to ensure its suitability. These include rigorous testing, IP scanning, and checking for security vulnerabilities.

If you have enabled suggestions that match public code then {% data variables.product.prodname_copilot_chat_short %} displays a message if matching code is found. The message includes links to repositories on {% data variables.product.github %} that contain matching code, and any license details that were found. For more information, see "[AUTOTITLE](/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions)."

### Inaccurate code

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ You can chat with {% data variables.product.prodname_copilot_short %} about a fi
1. You can continue the conversation by asking a follow-up question. For example, you could type "tell me more" to get {% data variables.product.prodname_copilot_short %} to expand on its last comment.
1. To clear, delete, or rename the current conversation thread, or to start a new thread, type `/` in the "Ask {% data variables.product.prodname_copilot_short %}" box, select from the options that are displayed, then press <kbd>Enter</kbd>.

1. To view a conversation in immersive mode, displaying just the conversation thread, click the dashed box icon at the top right of the conversation thread.

![Screenshot of the immersive mode button at the top right of the {% data variables.product.prodname_copilot_short %} panel. The button is highlighted with a dark orange outline.](/assets/images/help/copilot/copilot-immersive-view-button.png)
1. To view a conversation in immersive mode, displaying just the conversation thread, click {% octicon "kebab-horizontal" aria-label="Open conversation options" %} at the top right of the conversation thread, then click {% octicon "screen-full" aria-hidden="true" %} **Take conversation to immersive**.

## Asking questions about {% data variables.product.prodname_GH_advanced_security %} alerts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Finding public code that matches GitHub Copilot suggestions
shortTitle: Find matching code
intro: 'If you allow {% data variables.product.prodname_copilot %} to make suggestions that match publicly available code, you''ll see references to the matching code that was found on {% data variables.product.prodname_dotcom_the_website %}.'
intro: 'If you allow {% data variables.product.prodname_copilot %} to make suggestions that match publicly available code, {% data variables.product.prodname_copilot_short %} will display references to any matching code that is found.'
redirect_from:
- /early-access/copilot/code-referencing-in-github-copilot
topics:
Expand All @@ -10,40 +10,75 @@ versions:
feature: copilot
---

{% webui %}

This version of this article is for {% data variables.product.prodname_copilot_short %} on the {% data variables.product.github %} website. For the {% data variables.product.prodname_vscode %} version of this article, click the tab above.

{% endwebui %}

{% vscode %}

This version of this article is for {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_vscode %}. For the {% data variables.product.github %} website version of this article, click the tab above.

{% endvscode %}

## Limitations

References to matching code are currently only available in {% data variables.product.prodname_vscode %}.
References to matching code are currently only available in {% data variables.product.prodname_vscode %} and on the {% data variables.product.github %} website.

## Prerequisites

References to matching code are only generated if {% data variables.product.prodname_copilot_short %} is configured to allow suggestions that match publicly available code. For more information, see "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-your-personal-github-copilot-settings-on-githubcom#enabling-or-disabling-suggestions-matching-public-code)."

## About code referencing in {% data variables.product.prodname_copilot %}

{% vscode %}

If you've allowed suggestions that match public code, {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode_shortname %} can provide you with details of the code that a suggestion matches. This happens:

* When you accept a code completion suggestion in the editor.
* When a response in {% data variables.product.prodname_copilot_chat_short %} includes matching code.

{% endvscode %}

{% webui %}

If you've allowed suggestions that match public code, then whenever a response from {% data variables.product.prodname_copilot_chat_short %} includes matching code, details of the matches will be included in the response.

{% endwebui %}

This feature is called code referencing.

{% webui %}

> [!NOTE]
> Typically, matches to public code occur infrequently, so you should not expect to see code references in many {% data variables.product.prodname_copilot_chat_short %} responses.

{% endwebui %}

{% vscode %}

### Code referencing for {% data variables.product.prodname_copilot_short %} code completion

When you accept a code completion suggestion that matches code in a public {% data variables.product.prodname_dotcom %} repository, an entry is added to a {% data variables.product.prodname_copilot %} log. The log entry includes a link to a page on {% data variables.product.prodname_dotcom_the_website %} where you can view references to similar code in public {% data variables.product.prodname_dotcom %} repositories.

The linked web page includes details of any license identified for the repository where the matching code was found. Having reviewed the references, you can decide how to proceed. For example, you can decide what attribution to use, or whether you want to remove this code from your project.

> [!NOTE]
> * Code referencing only occurs for matches of accepted {% data variables.product.prodname_copilot_short %} suggestions. Code you have written, and {% data variables.product.prodname_copilot_short %} suggestions you have altered, are not checked for matches to public code.
> * Code referencing for code completion only occurs for matches of accepted {% data variables.product.prodname_copilot_short %} suggestions. Code you have written, and {% data variables.product.prodname_copilot_short %} suggestions you have altered, are not checked for matches to public code.
> * Typically, matches to public code occur in less than one percent of {% data variables.product.prodname_copilot_short %} suggestions, so you should not expect to see code references for many suggestions.

### Code referencing for {% data variables.product.prodname_copilot_chat_short %}

When {% data variables.product.prodname_copilot_chat_short %} provides a response that includes code that matches code in a public {% data variables.product.prodname_dotcom %} repository, this is indicated at the end of the response with a link to display details of the matched code in the {% data variables.product.prodname_vscode_shortname %} editor.

{% endvscode %}

### How code referencing finds matching code

{% data variables.product.prodname_copilot_short %} code referencing searches for matches by taking the code suggestion, plus some surrounding code, and comparing it against an index of all public repositories on {% data variables.product.prodname_dotcom_the_website %}. Code in private {% data variables.product.prodname_dotcom %} repositories, or code outside of {% data variables.product.prodname_dotcom %}, is not included in the search process. The search index is refreshed every few months. As a result, newly committed code, and code from public repositories deleted before the index was created, may not be included in the search. For the same reason, the search may return matches to code that has been deleted or moved since the index was created.
{% data variables.product.prodname_copilot_short %} code referencing searches for matches by taking the code suggestion, plus some of the code that will surround the suggestion if it is accepted, and comparing it against an index of all public repositories on {% data variables.product.prodname_dotcom_the_website %}. Code in private {% data variables.product.prodname_dotcom %} repositories, or code outside of {% data variables.product.prodname_dotcom %}, is not included in the search process. The search index is refreshed every few months. As a result, newly committed code, and code from public repositories deleted before the index was created, may not be included in the search. For the same reason, the search may return matches to code that has been deleted or moved since the index was created.

{% vscode %}

## View code references for code completion

Expand Down Expand Up @@ -101,8 +136,12 @@ You can verify that code referencing is working by prompting {% data variables.p

If code referencing finds a match to public code, a log entry is added to the **{% data variables.product.prodname_copilot %} Log** view.

{% endvscode %}

## View code references for {% data variables.product.prodname_copilot_chat_short %}

{% vscode %}

If a response in {% data variables.product.prodname_copilot_chat_short %} includes matching code, this is indicated at the end of the response by the following text:

> Similar code found with _n_ license types - **View matches**
Expand All @@ -116,3 +155,23 @@ If a response in {% data variables.product.prodname_copilot_chat_short %} includ
* A code snippet showing the matching code.

1. In the editor, <kbd>Ctrl</kbd>+click (Windows/Linux) or <kbd>Command</kbd>+click (Mac) a URL to view the full file on {% data variables.product.prodname_dotcom_the_website %}.

{% endvscode %}

{% webui %}

When {% data variables.product.prodname_copilot_chat_short %} provides a response that includes code that matches code in a public {% data variables.product.prodname_dotcom %} repository, this is indicated beneath the code suggestion:

> < > Public code references from _n_ repositories

To see details of the matching code:

1. Click the "Public code references..." text, under the code suggestion.

A list of {% data variables.product.github %} repositories containing matching code is displayed in a dropdown, together with licensing information, if found.

![Screenshot of a code completion suggestion in {% data variables.product.prodname_copilot_chat_short %} with a link to view code references.](/assets/images/help/copilot/code-reference-dotcom.png)

1. Click the name of a repository to display that repository on {% data variables.product.prodname_dotcom_the_website %}.

{% endwebui %}
Loading
Loading