Skip to main content

devcontainer_permissions

Creates, updates, deletes, gets or lists a devcontainer_permissions resource.

Overview

Namedevcontainer_permissions
TypeResource
Idgithub.codespaces.devcontainer_permissions

Fields

The following fields are returned by SELECT queries:

Response when the permission check is successful

NameDatatypeDescription
acceptedbooleanWhether the user has accepted the permissions defined by the devcontainer config

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
check_permissions_for_devcontainerselectowner, repo, ref, devcontainer_pathChecks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.

OAuth app tokens and personal access tokens (classic) need the codespace scope 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
devcontainer_pathstringPath to the devcontainer.json configuration to use for the permission check.
ownerstringThe account owner of the repository. The name is not case sensitive.
refstringThe git reference that points to the location of the devcontainer configuration to use for the permission check. The value of ref will typically be a branch name (heads/BRANCH_NAME). For more information, see "Git References" in the Git documentation.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

SELECT examples

Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.

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

SELECT
accepted
FROM github.codespaces.devcontainer_permissions
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND ref = '{{ ref }}' -- required
AND devcontainer_path = '{{ devcontainer_path }}' -- required
;