devcontainer_permissions
Creates, updates, deletes, gets or lists a devcontainer_permissions resource.
Overview
| Name | devcontainer_permissions |
| Type | Resource |
| Id | github.codespaces.devcontainer_permissions |
Fields
The following fields are returned by SELECT queries:
- check_permissions_for_devcontainer
Response when the permission check is successful
| Name | Datatype | Description |
|---|---|---|
accepted | boolean | Whether the user has accepted the permissions defined by the devcontainer config |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
check_permissions_for_devcontainer | select | owner, repo, ref, devcontainer_path | 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. |
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 |
|---|---|---|
devcontainer_path | string | Path to the devcontainer.json configuration to use for the permission check. |
owner | string | The account owner of the repository. The name is not case sensitive. |
ref | string | The 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. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
SELECT examples
- check_permissions_for_devcontainer
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
;