You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot.md
+26-22Lines changed: 26 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Excluding content from GitHub Copilot
3
3
shortTitle: Exclude content from Copilot
4
4
intro: 'You can prevent {% data variables.product.prodname_copilot_short %} from accessing certain content.'
5
-
permissions: 'Repository administrators{% ifversion ghec%}, organization owners, and enterprise owners{% else %} and organization owners{% endif %} can manage content exclusion settings. People with the "Maintain" role for a repository can view, but not edit, content exclusion settings for that repository.'
5
+
permissions: 'Repository administrators, organization owners, and enterprise owners can manage content exclusion settings. People with the "Maintain" role for a repository can view, but not edit, content exclusion settings for that repository.'
6
6
product: '{% data reusables.gated-features.copilot-business-and-enterprise %}'
7
7
layout: inline
8
8
versions:
@@ -22,9 +22,9 @@ topics:
22
22
- Copilot
23
23
---
24
24
25
-
## About content exclusions for {% data variables.product.prodname_copilot_short %}
25
+
## About content exclusion for {% data variables.product.prodname_copilot_short %}
26
26
27
-
You can use content exclusions to configure {% data variables.product.prodname_copilot_short %} to ignore certain files. When you exclude content from {% data variables.product.prodname_copilot_short %}:
27
+
You can use content exclusion to configure {% data variables.product.prodname_copilot_short %} to ignore certain files. When you exclude content from {% data variables.product.prodname_copilot_short %}:
28
28
29
29
* Code completion will not be available in the affected files.
30
30
* The content in affected files will not inform code completion suggestions in other files.
@@ -33,11 +33,13 @@ You can use content exclusions to configure {% data variables.product.prodname_c
33
33
34
34
### Who can configure content exclusion
35
35
36
-
Repository administrators{% ifversion ghec %}, organization owners, and enterprise owners{% else %} and organization owners{% endif %} can configure content exclusion.
36
+
Repository administrators, organization owners, and enterprise owners can configure content exclusion.
37
37
38
38
{% data reusables.copilot.content-exclusions-scope %}
39
39
40
-
### Availability of content exclusions
40
+
### Availability of content exclusion
41
+
42
+
The {% data variables.copilot.copilot_business_short %} and {% data variables.copilot.copilot_enterprise_short %} plans provide the following level of support for content exclusion.
41
43
42
44
| Tool | Code completion support | {% data variables.copilot.copilot_chat_short %} support |
@@ -57,7 +59,7 @@ Content exclusions also apply to {% data variables.copilot.copilot_code-review_s
57
59
> * Content exclusion is in {% data variables.release-phases.public_preview %} on the {% data variables.product.github %} website and in {% data variables.product.prodname_mobile %} and is subject to change.
58
60
> * Content exclusion is currently not supported in Edit and Agent modes of {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %}.
59
61
60
-
### Limitations of content exclusions
62
+
### Limitations of content exclusion
61
63
62
64
{% data reusables.copilot.content-exclusion-limitations %}
63
65
@@ -67,16 +69,16 @@ Currently, content exclusions do not apply to symbolic links (symlinks).
67
69
68
70
After you configure content exclusion, the client (for example, the {% data variables.product.prodname_copilot_short %} extension for {% data variables.product.prodname_vscode_shortname %}) sends the current repository URL to the {% data variables.product.prodname_dotcom %} server so that the server can return the correct policy to the client. These URLs are not logged anywhere.
69
71
70
-
## Configuring content exclusions for your repository
72
+
## Configuring content exclusion for your repository
71
73
72
74
You can use your repository settings to specify content in your repository that {% data variables.product.prodname_copilot %} should ignore.
73
75
74
76
{% data reusables.repositories.navigate-to-repo %}
75
77
{% data reusables.repositories.sidebar-settings %}
76
78
77
-
1. In the "Code & automation" section of the sidebar, click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}**.
79
+
1. In the "Code & automation" section of the sidebar, click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}** then click **Content exclusion**.
78
80
79
-
If your repository inherits any exclusions from {% ifversion fpt %}its parent organization{% else %} organizations in the same enterprise{% endif %}, you'll see {% ifversion ghec %}one or more{% else %} a{% endif %} gray box{% ifversion ghec %}es{% endif %} at the top of the page containing details of these exclusions. You cannot edit these settings.
81
+
If your repository inherits any exclusions from its parent organization, or from organizations in the same enterprise, you'll see one or moregray boxes at the top of the page, containing details of these exclusions. You cannot edit these settings.
80
82
81
83
1. In the box following "Paths to exclude in this repository," enter the paths to files from which {% data variables.product.prodname_copilot_short %} should be excluded.
82
84
@@ -103,7 +105,7 @@ You can use your repository settings to specify content in your repository that
103
105
- "/scripts/**"
104
106
```
105
107
106
-
## Configuring content exclusions for your organization
108
+
## Configuring content exclusion for your organization
107
109
108
110
You can use your organization settings to specify files that {% data variables.product.prodname_copilot %} should ignore. The files can be within a Git repository or anywhere on the file system that is not under Git control.
## Configuring content exclusions for your enterprise
191
+
## Configuring content exclusion for your enterprise
192
192
193
193
As an enterprise owner, you can use the enterprise settings to specify files that {% data variables.product.prodname_copilot %} should ignore. The files can be within a Git repository or anywhere on the file system that is not under Git control.
194
194
195
195
{% data reusables.enterprise-accounts.access-enterprise %}
196
196
{% data reusables.enterprise-accounts.policies-tab %}
197
197
{% data reusables.enterprise-accounts.copilot-tab %}
198
198
1. Click the **Content exclusion** tab.
199
-
1. Use paths to specify which content to exclude. See the previous section, [Configuring content exclusions for your organization](#configuring-content-exclusions-for-your-organization).
199
+
1. Use paths to specify which content to exclude. See the previous section, [Configuring content exclusion for your organization](#configuring-content-exclusion-for-your-organization).
200
200
201
201
> [!NOTE]
202
202
> The key difference between setting content exclusion at the enterprise level and the organization level is that rules set at the enterprise level apply to all {% data variables.product.prodname_copilot_short %} users in the enterprise, whereas the rules set by organization owners only apply to users who are assigned a {% data variables.product.prodname_copilot_short %} seat by that organization.
203
203
204
-
{% endif %}
205
-
206
204
## Testing changes to content exclusions
207
205
208
206
You can use your IDE to confirm that your changes to content exclusions are working as expected.
@@ -220,13 +218,19 @@ After you add or change content exclusions, it can take up to 30 minutes to take
220
218
221
219
### Test your content exclusions
222
220
223
-
There are a few different ways to test your content exclusions, depending on which IDE you're using.
221
+
You can verify that content exclusions you have configured are working as expected.
222
+
223
+
1. First confirm that content exclusion is working in files that are not subject to content exclusion. To do this:
224
+
* In your IDE, open a file that is not subject to content exclusion.
225
+
* Make an edit that would normally generate a code completion suggestion. A suggestion should be offered
226
+
1. Open a file that should be excluded and make the same edit. No suggestion should be offered.
227
+
1. To test content exclusion for {% data variables.copilot.copilot_chat_short %}:
228
+
* In your IDE, open the {% data variables.copilot.copilot_chat_short %} panel.
229
+
* Open a file that should be excluded and close any other files that are open in the editor.
230
+
* Make sure that the open file is attached to the prompt as the context file.
231
+
* Enter the prompt `explain this file`.
224
232
225
-
1. Open a file that you expect to be affected by your content exclusions.
226
-
1. Use one or more of the following techniques to test if content is being excluded:
227
-
* **In JetBrains IDEs, {% data variables.product.prodname_vs %}, and {% data variables.product.prodname_vscode %}**, check the {% data variables.product.prodname_copilot_short %} icon in the status bar. If a {% data variables.product.prodname_copilot_short %} content exclusion applies to the file, the {% data variables.product.prodname_copilot_short %} icon will have a diagonal line through it. Hover over the icon to see whether an organization or the parent repository disabled {% data variables.product.prodname_copilot_short %} for the file.
228
-
* **In Vim/Neovim**, begin typing in the file. If {% data variables.product.prodname_copilot %} no longer provides inline suggestions as you type, the file is excluded.
229
-
* You can also test content exclusions in {% data variables.copilot.copilot_chat_short %}. Open the {% data variables.copilot.copilot_chat_short %} window, and ask {% data variables.copilot.copilot_chat_short %} a question about the excluded file. If your content is excluded successfully, {% data variables.product.prodname_copilot_short %} will be unable to answer your question, and will explain that some files were excluded from the conversation due to content exclusion rules.
233
+
If the file is excluded, {% data variables.copilot.copilot_chat_short %} will not be able to use the file to generate a response. The file will not be listed as a reference in {% data variables.product.prodname_copilot_short %}'s response.
| {% data variables.product.prodname_copilot_short %} knowledge bases |{% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} |
101
102
| Fine tuning a custom large language model (limited {% data variables.release-phases.public_preview %})[^6]| {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} |
0 commit comments