View Source GitHub.Codespaces (GitHub REST API Client v0.3.3)
Provides API endpoints related to codespaces
Link to this section Summary
Functions
Add a selected repository to a user secret
Add selected repository to an organization secret
Check if permissions defined by a devcontainer have been accepted by the authenticated user
List machine types for a codespace
Create a codespace for the authenticated user
Create or update an organization secret
Create or update a repository secret
Create or update a secret for the authenticated user
Create a codespace from a pull request
Create a codespace in a repository
Remove users from Codespaces access for an organization
Delete a codespace for the authenticated user
Delete a codespace from the organization
Delete an organization secret
Delete a repository secret
Delete a secret for the authenticated user
Export a codespace for the authenticated user
List codespaces for a user in organization
Get details about a codespace export
Get a codespace for the authenticated user
Get an organization public key
Get an organization secret
Get public key for the authenticated user
Get a repository public key
Get a repository secret
Get a secret for the authenticated user
List devcontainer configurations in a repository for the authenticated user
List codespaces for the authenticated user
List codespaces for the organization
List codespaces in a repository for the authenticated user
List organization secrets
List repository secrets
List selected repositories for a user secret
List secrets for the authenticated user
List selected repositories for an organization secret
Get default attributes for a codespace
Create a repository from an unpublished codespace
Remove a selected repository from a user secret
Remove selected repository from an organization secret
List available machine types for a repository
Manage access control for organization codespaces
Add users to Codespaces access for an organization
Set selected repositories for a user secret
Set selected repositories for an organization secret
Start a codespace for the authenticated user
Stop a codespace for the authenticated user
Stop a codespace for an organization user
Update a codespace for the authenticated user
Link to this section Functions
add_repository_for_secret_for_authenticated_user(secret_name, repository_id, opts \\ [])
View Source@spec add_repository_for_secret_for_authenticated_user( String.t(), integer(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Add a selected repository to a user secret
Adds a repository to the selected repositories for a user's development environment secret.
The authenticated user must have Codespaces access to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the codespace
or codespace:secrets
scope to use this endpoint.
resources
Resources
add_selected_repo_to_org_secret(org, secret_name, repository_id, opts \\ [])
View Source@spec add_selected_repo_to_org_secret(String.t(), String.t(), integer(), keyword()) :: :ok | {:error, GitHub.Error.t()}
Add selected repository to an organization secret
Adds a repository to an organization development environment secret when the visibility
for repository access is set to selected
. The visibility is set when you Create or update an organization secret.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec check_permissions_for_devcontainer(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.PermissionsCheckForDevcontainer.t()} | {:error, GitHub.Error.t()}
Check if permissions defined by a devcontainer have been accepted by the authenticated user
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.
options
Options
ref
: The git reference that points to the location of the devcontainer configuration to use for the permission check. The value ofref
will typically be a branch name (heads/BRANCH_NAME
). For more information, see "Git References" in the Git documentation.devcontainer_path
: Path to the devcontainer.json configuration to use for the permission check.
resources
Resources
codespace_machines_for_authenticated_user(codespace_name, opts \\ [])
View Source@spec codespace_machines_for_authenticated_user( String.t(), keyword() ) :: {:ok, GitHub.Codespace.codespace_machines_for_authenticated_user_200_json_resp()} | {:error, GitHub.Error.t()}
List machine types for a codespace
List the machine types a codespace can transition to use.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
@spec create_for_authenticated_user( GitHub.Codespace.create_for_authenticated_user_json_req(), keyword() ) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}
Create a codespace for the authenticated user
Creates a new codespace, owned by the authenticated user.
This endpoint requires either a repository_id
OR a pull_request
but not both.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
@spec create_or_update_org_secret( String.t(), String.t(), GitHub.Codespace.create_or_update_org_secret_json_req(), keyword() ) :: {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}
Create or update an organization secret
Creates or updates an organization development environment secret with an encrypted value. Encrypt your secret using LibSodium. For more information, see "Encrypting secrets for the REST API."
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
create_or_update_repo_secret(owner, repo, secret_name, body, opts \\ [])
View Source@spec create_or_update_repo_secret( String.t(), String.t(), String.t(), GitHub.Codespace.create_or_update_repo_secret_json_req(), keyword() ) :: {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}
Create or update a repository secret
Creates or updates a repository development environment secret with an encrypted value. Encrypt your secret using LibSodium. For more information, see "Encrypting secrets for the REST API."
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
resources
Resources
create_or_update_secret_for_authenticated_user(secret_name, body, opts \\ [])
View Source@spec create_or_update_secret_for_authenticated_user( String.t(), GitHub.Codespace.create_or_update_secret_for_authenticated_user_json_req(), keyword() ) :: {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}
Create or update a secret for the authenticated user
Creates or updates a development environment secret for a user's codespace with an encrypted value. Encrypt your secret using LibSodium. For more information, see "Encrypting secrets for the REST API."
The authenticated user must have Codespaces access to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the codespace
or codespace:secrets
scope to use this endpoint.
resources
Resources
create_with_pr_for_authenticated_user(owner, repo, pull_number, body, opts \\ [])
View Source@spec create_with_pr_for_authenticated_user( String.t(), String.t(), integer(), GitHub.Codespace.create_with_pr_for_authenticated_user_json_req() | nil, keyword() ) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}
Create a codespace from a pull request
Creates a codespace owned by the authenticated user for the specified pull request.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
create_with_repo_for_authenticated_user(owner, repo, body, opts \\ [])
View Source@spec create_with_repo_for_authenticated_user( String.t(), String.t(), GitHub.Codespace.create_with_repo_for_authenticated_user_json_req() | nil, keyword() ) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}
Create a codespace in a repository
Creates a codespace owned by the authenticated user in the specified repository.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
@spec delete_codespaces_access_users( String.t(), GitHub.Codespace.delete_codespaces_access_users_json_req(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Remove users from Codespaces access for an organization
Codespaces for the specified users will no longer be billed to the organization.
To use this endpoint, the access settings for the organization must be set to selected_members
.
For information on how to change this setting, see "Manage access control for organization codespaces."
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec delete_for_authenticated_user( String.t(), keyword() ) :: {:ok, map()} | {:error, GitHub.Error.t()}
Delete a codespace for the authenticated user
Deletes a user's codespace.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
delete_from_organization(org, username, codespace_name, opts \\ [])
View Source@spec delete_from_organization(String.t(), String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}
Delete a codespace from the organization
Deletes a user's codespace.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec delete_org_secret(String.t(), String.t(), keyword()) :: :ok | {:error, GitHub.Error.t()}
Delete an organization secret
Deletes an organization development environment secret using the secret name.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec delete_repo_secret(String.t(), String.t(), String.t(), keyword()) :: :ok | {:error, GitHub.Error.t()}
Delete a repository secret
Deletes a development environment secret in a repository using the secret name.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
resources
Resources
@spec delete_secret_for_authenticated_user( String.t(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Delete a secret for the authenticated user
Deletes a development environment secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret.
The authenticated user must have Codespaces access to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the codespace
or codespace:secrets
scope to use this endpoint.
resources
Resources
@spec export_for_authenticated_user( String.t(), keyword() ) :: {:ok, GitHub.Codespace.ExportDetails.t()} | {:error, GitHub.Error.t()}
Export a codespace for the authenticated user
Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored.
If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
@spec get_codespaces_for_user_in_org(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.get_codespaces_for_user_in_org_200_json_resp()} | {:error, GitHub.Error.t()}
List codespaces for a user in organization
Lists the codespaces that a member of an organization has for repositories in that organization.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
options
Options
per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
get_export_details_for_authenticated_user(codespace_name, export_id, opts \\ [])
View Source@spec get_export_details_for_authenticated_user(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.ExportDetails.t()} | {:error, GitHub.Error.t()}
Get details about a codespace export
Gets information about an export of a codespace.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
@spec get_for_authenticated_user( String.t(), keyword() ) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}
Get a codespace for the authenticated user
Gets information about a user's codespace.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
@spec get_org_public_key( String.t(), keyword() ) :: {:ok, GitHub.Codespace.PublicKey.t()} | {:error, GitHub.Error.t()}
Get an organization public key
Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec get_org_secret(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.OrgSecret.t()} | {:error, GitHub.Error.t()}
Get an organization secret
Gets an organization development environment secret without revealing its encrypted value.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec get_public_key_for_authenticated_user(keyword()) :: {:ok, GitHub.Codespace.UserPublicKey.t()} | {:error, GitHub.Error.t()}
Get public key for the authenticated user
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.
The authenticated user must have Codespaces access to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the codespace
or codespace:secrets
scope to use this endpoint.
resources
Resources
@spec get_repo_public_key(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.PublicKey.t()} | {:error, GitHub.Error.t()}
Get a repository public key
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.
Anyone with read access to the repository can use this endpoint.
If the repository is private, OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
resources
Resources
@spec get_repo_secret(String.t(), String.t(), String.t(), keyword()) :: {:ok, GitHub.RepoCodespacesSecret.t()} | {:error, GitHub.Error.t()}
Get a repository secret
Gets a single repository development environment secret without revealing its encrypted value.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
resources
Resources
@spec get_secret_for_authenticated_user( String.t(), keyword() ) :: {:ok, GitHub.Codespace.Secret.t()} | {:error, GitHub.Error.t()}
Get a secret for the authenticated user
Gets a development environment secret available to a user's codespaces without revealing its encrypted value.
The authenticated user must have Codespaces access to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the codespace
or codespace:secrets
scope to use this endpoint.
resources
Resources
list_devcontainers_in_repository_for_authenticated_user(owner, repo, opts \\ [])
View Source@spec list_devcontainers_in_repository_for_authenticated_user( String.t(), String.t(), keyword() ) :: {:ok, GitHub.Codespace.list_devcontainers_in_repository_for_authenticated_user_200_json_resp()} | {:error, GitHub.Error.t()}
List devcontainer configurations in a repository for the authenticated user
Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files specify launchpoint configurations for codespaces created within the repository.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
options
Options
per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec list_for_authenticated_user(keyword()) :: {:ok, GitHub.Codespace.list_for_authenticated_user_200_json_resp()} | {:error, GitHub.Error.t()}
List codespaces for the authenticated user
Lists the authenticated user's codespaces.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
options
Options
per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."repository_id
: ID of the Repository to filter on
resources
Resources
@spec list_in_organization( String.t(), keyword() ) :: {:ok, GitHub.Codespace.list_in_organization_200_json_resp()} | {:error, GitHub.Error.t()}
List codespaces for the organization
Lists the codespaces associated to a specified organization.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
options
Options
per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
list_in_repository_for_authenticated_user(owner, repo, opts \\ [])
View Source@spec list_in_repository_for_authenticated_user(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.list_in_repository_for_authenticated_user_200_json_resp()} | {:error, GitHub.Error.t()}
List codespaces in a repository for the authenticated user
Lists the codespaces associated to a specified repository and the authenticated user.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
options
Options
per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec list_org_secrets( String.t(), keyword() ) :: {:ok, GitHub.Codespace.list_org_secrets_200_json_resp()} | {:error, GitHub.Error.t()}
List organization secrets
Lists all Codespaces development environment secrets available at the organization-level without revealing their encrypted values.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
options
Options
per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec list_repo_secrets(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.list_repo_secrets_200_json_resp()} | {:error, GitHub.Error.t()}
List repository secrets
Lists all development environment secrets available in a repository without revealing their encrypted values.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
options
Options
per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
list_repositories_for_secret_for_authenticated_user(secret_name, opts \\ [])
View Source@spec list_repositories_for_secret_for_authenticated_user( String.t(), keyword() ) :: {:ok, GitHub.Codespace.list_repositories_for_secret_for_authenticated_user_200_json_resp()} | {:error, GitHub.Error.t()}
List selected repositories for a user secret
List the repositories that have been granted the ability to use a user's development environment secret.
The authenticated user must have Codespaces access to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the codespace
or codespace:secrets
scope to use this endpoint.
resources
Resources
@spec list_secrets_for_authenticated_user(keyword()) :: {:ok, GitHub.Codespace.list_secrets_for_authenticated_user_200_json_resp()} | {:error, GitHub.Error.t()}
List secrets for the authenticated user
Lists all development environment secrets available for a user's codespaces without revealing their encrypted values.
The authenticated user must have Codespaces access to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the codespace
or codespace:secrets
scope to use this endpoint.
options
Options
per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."
resources
Resources
@spec list_selected_repos_for_org_secret(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.list_selected_repos_for_org_secret_200_json_resp()} | {:error, GitHub.Error.t()}
List selected repositories for an organization secret
Lists all repositories that have been selected when the visibility
for repository access to a secret is set to selected
.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
options
Options
page
: The page number of the results to fetch. For more information, see "Using pagination in the REST API."per_page
: The number of results per page (max 100). For more information, see "Using pagination in the REST API."
resources
Resources
pre_flight_with_repo_for_authenticated_user(owner, repo, opts \\ [])
View Source@spec pre_flight_with_repo_for_authenticated_user(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.pre_flight_with_repo_for_authenticated_user_200_json_resp()} | {:error, GitHub.Error.t()}
Get default attributes for a codespace
Gets the default attributes for codespaces created by the user with the repository.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
options
Options
ref
: The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked.client_ip
: An alternative IP for default location auto-detection, such as when proxying a request.
resources
Resources
@spec publish_for_authenticated_user( String.t(), GitHub.Codespace.publish_for_authenticated_user_json_req(), keyword() ) :: {:ok, GitHub.Codespace.WithFullRepository.t()} | {:error, GitHub.Error.t()}
Create a repository from an unpublished codespace
Publishes an unpublished codespace, creating a new repository and assigning it to the codespace.
The codespace's token is granted write permissions to the repository, allowing the user to push their changes.
This will fail for a codespace that is already published, meaning it has an associated repository.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
remove_repository_for_secret_for_authenticated_user(secret_name, repository_id, opts \\ [])
View Source@spec remove_repository_for_secret_for_authenticated_user( String.t(), integer(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Remove a selected repository from a user secret
Removes a repository from the selected repositories for a user's development environment secret.
The authenticated user must have Codespaces access to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the codespace
or codespace:secrets
scope to use this endpoint.
resources
Resources
remove_selected_repo_from_org_secret(org, secret_name, repository_id, opts \\ [])
View Source@spec remove_selected_repo_from_org_secret( String.t(), String.t(), integer(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Remove selected repository from an organization secret
Removes a repository from an organization development environment secret when the visibility
for repository access is set to selected
. The visibility is set when you Create
or update an organization secret.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec repo_machines_for_authenticated_user(String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.repo_machines_for_authenticated_user_200_json_resp()} | {:error, GitHub.Error.t()}
List available machine types for a repository
List the machine types available for a given repository based on its configuration.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
options
Options
location
: The location to check for available machines. Assigned by IP if not provided.client_ip
: IP for location auto-detection when proxying a requestref
: The branch or commit to check for prebuild availability and devcontainer restrictions.
resources
Resources
@spec set_codespaces_access( String.t(), GitHub.Codespace.set_codespaces_access_json_req(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Manage access control for organization codespaces
Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec set_codespaces_access_users( String.t(), GitHub.Codespace.set_codespaces_access_users_json_req(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Add users to Codespaces access for an organization
Codespaces for the specified users will be billed to the organization.
To use this endpoint, the access settings for the organization must be set to selected_members
.
For information on how to change this setting, see "Manage access control for organization codespaces."
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
set_repositories_for_secret_for_authenticated_user(secret_name, body, opts \\ [])
View Source@spec set_repositories_for_secret_for_authenticated_user( String.t(), GitHub.Codespace.set_repositories_for_secret_for_authenticated_user_json_req(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Set selected repositories for a user secret
Select the repositories that will use a user's development environment secret.
The authenticated user must have Codespaces access to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the codespace
or codespace:secrets
scope to use this endpoint.
resources
Resources
set_selected_repos_for_org_secret(org, secret_name, body, opts \\ [])
View Source@spec set_selected_repos_for_org_secret( String.t(), String.t(), GitHub.Codespace.set_selected_repos_for_org_secret_json_req(), keyword() ) :: :ok | {:error, GitHub.Error.t()}
Set selected repositories for an organization secret
Replaces all repositories for an organization development environment secret when the visibility
for repository access is set to selected
. The visibility is set when you Create
or update an organization secret.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec start_for_authenticated_user( String.t(), keyword() ) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}
Start a codespace for the authenticated user
Starts a user's codespace.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
@spec stop_for_authenticated_user( String.t(), keyword() ) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}
Stop a codespace for the authenticated user
Stops a user's codespace.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
resources
Resources
@spec stop_in_organization(String.t(), String.t(), String.t(), keyword()) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}
Stop a codespace for an organization user
Stops a user's codespace.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
resources
Resources
@spec update_for_authenticated_user( String.t(), GitHub.Codespace.update_for_authenticated_user_json_req(), keyword() ) :: {:ok, GitHub.Codespace.t()} | {:error, GitHub.Error.t()}
Update a codespace for the authenticated user
Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint.
If you specify a new machine type it will be applied the next time your codespace is started.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.