org_coding_agent_repos
Creates, updates, deletes, gets or lists an org_coding_agent_repos resource.
Overview
| Name | org_coding_agent_repos |
| Type | Resource |
| Id | github.copilot.org_coding_agent_repos |
Fields
The following fields are returned by SELECT queries:
- list_copilot_coding_agent_selected_repositories_for_organization
Response
| Name | Datatype | Description |
|---|---|---|
repositories | array | |
total_count | integer |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_copilot_coding_agent_selected_repositories_for_organization | select | org | per_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_organization | replace | org, 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_organization | replace | org, 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_organization | delete | org, 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.
| Name | Datatype | Description |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
repository_id | integer | The unique identifier of the repository. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_copilot_coding_agent_selected_repositories_for_organization
> [!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
- enable_copilot_coding_agent_for_repository_in_organization
- set_copilot_coding_agent_selected_repositories_for_organization
> [!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;
> [!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.
REPLACE github.copilot.org_coding_agent_repos
SET
selected_repository_ids = '{{ selected_repository_ids }}'
WHERE
org = '{{ org }}' --required
AND selected_repository_ids = '{{ selected_repository_ids }}' --required;
DELETE examples
- disable_copilot_coding_agent_for_repository_in_organization
> [!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
;