Skip to main content

org_coding_agent_repos

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

Overview

Nameorg_coding_agent_repos
TypeResource
Idgithub.copilot.org_coding_agent_repos

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
repositoriesarray
total_countinteger

Methods

The following methods are available for this resource:

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

Lists the selected repositories that are enabled for Copilot coding agent in an organization.

Organization owners can use this endpoint when the coding agent repository policy
is set to selected to see which repositories have been enabled.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
enable_copilot_coding_agent_for_repository_in_organizationreplaceorg, repository_id> [!NOTE]
> This endpoint is in public preview and is subject to change.

Adds a repository to the list of selected repositories enabled for Copilot
coding agent in an organization. This method can only be called when the
coding agent repository policy is set to selected.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
set_copilot_coding_agent_selected_repositories_for_organizationreplaceorg, selected_repository_ids> [!NOTE]
> This endpoint is in public preview and is subject to change.

Replaces the list of selected repositories that are enabled for Copilot coding
agent in an organization. This method can only be called when the coding agent
repository policy is set to selected.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
disable_copilot_coding_agent_for_repository_in_organizationdeleteorg, repository_id> [!NOTE]
> This endpoint is in public preview and is subject to change.

Removes a repository from the list of selected repositories enabled for Copilot
coding agent in an organization. This method can only be called when the
coding agent repository policy is set to selected.

OAuth app tokens and personal access tokens (classic) need the admin:org scopes to use this endpoint.

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.
repository_idintegerThe unique identifier of the repository.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

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

Lists the selected repositories that are enabled for Copilot coding agent in an organization.

Organization owners can use this endpoint when the coding agent repository policy
is set to selected to see which repositories have been enabled.

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

SELECT
repositories,
total_count
FROM github.copilot.org_coding_agent_repos
WHERE org = '{{ org }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;

REPLACE examples

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

Adds a repository to the list of selected repositories enabled for Copilot
coding agent in an organization. This method can only be called when the
coding agent repository policy is set to selected.

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

REPLACE github.copilot.org_coding_agent_repos
SET
-- No updatable properties
WHERE
org = '{{ org }}' --required
AND repository_id = '{{ repository_id }}' --required;

DELETE examples

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

Removes a repository from the list of selected repositories enabled for Copilot
coding agent in an organization. This method can only be called when the
coding agent repository policy is set to selected.

OAuth app tokens and personal access tokens (classic) need the admin:org scopes to use this endpoint.

DELETE FROM github.copilot.org_coding_agent_repos
WHERE org = '{{ org }}' --required
AND repository_id = '{{ repository_id }}' --required
;