Skip to main content

org_content_exclusion

Creates, updates, deletes, gets or lists an org_content_exclusion resource.

Overview

Nameorg_content_exclusion
TypeResource
Idgithub.copilot.org_content_exclusion

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
set_copilot_content_exclusion_for_organizationreplaceorg> [!NOTE]
> This endpoint is in public preview and is subject to change.

Sets Copilot content exclusion path rules for an organization.
To configure these settings, go to the organization's settings on GitHub.
For more information, see "Excluding content from GitHub Copilot."

Organization owners can set Copilot content exclusion rules for the organization.

OAuth app tokens and personal access tokens (classic) need the copilot scope to use this endpoint.

> [!CAUTION]
> * At this time, the API does not support comments. When using this endpoint, any existing comments in your rules will be deleted.
> * At this time, the API does not support duplicate keys. If you submit content exclusions through the API with duplicate keys, only the last occurrence will be saved. Earlier entries with the same key will be overwritten.
copilot_content_exclusion_for_organizationexecorg> [!NOTE]
> This endpoint is in public preview and is subject to change.

Gets information about an organization's Copilot content exclusion path rules.
To configure these settings, go to the organization's settings on GitHub.
For more information, see "Excluding content from GitHub Copilot."

Organization owners can view details about Copilot content exclusion rules for the organization.

OAuth app tokens and personal access tokens (classic) need either the copilot or read:org scopes to use this endpoint.

> [!CAUTION]
> * At this time, the API does not support comments. This endpoint will not return any comments in the existing rules.
> * At this time, the API does not support duplicate keys. If your content exclusion configuration contains duplicate keys, the API will return only the last occurrence of that key. For example, if duplicate entries are present, only the final value will be included in the response.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
orgstringThe organization name. The name is not case sensitive.

REPLACE examples

> [!NOTE]
> This endpoint is in public preview and is subject to change.

Sets Copilot content exclusion path rules for an organization.
To configure these settings, go to the organization's settings on GitHub.
For more information, see "Excluding content from GitHub Copilot."

Organization owners can set Copilot content exclusion rules for the organization.

OAuth app tokens and personal access tokens (classic) need the copilot scope to use this endpoint.

> [!CAUTION]
> * At this time, the API does not support comments. When using this endpoint, any existing comments in your rules will be deleted.
> * At this time, the API does not support duplicate keys. If you submit content exclusions through the API with duplicate keys, only the last occurrence will be saved. Earlier entries with the same key will be overwritten.

REPLACE github.copilot.org_content_exclusion
SET
-- No updatable properties
WHERE
org = '{{ org }}' --required
RETURNING
message;

Lifecycle Methods

> [!NOTE]
> This endpoint is in public preview and is subject to change.

Gets information about an organization's Copilot content exclusion path rules.
To configure these settings, go to the organization's settings on GitHub.
For more information, see "Excluding content from GitHub Copilot."

Organization owners can view details about Copilot content exclusion rules for the organization.

OAuth app tokens and personal access tokens (classic) need either the copilot or read:org scopes to use this endpoint.

> [!CAUTION]
> * At this time, the API does not support comments. This endpoint will not return any comments in the existing rules.
> * At this time, the API does not support duplicate keys. If your content exclusion configuration contains duplicate keys, the API will return only the last occurrence of that key. For example, if duplicate entries are present, only the final value will be included in the response.

EXEC github.copilot.org_content_exclusion.copilot_content_exclusion_for_organization 
@org='{{ org }}' --required
;