View Source GitHub.Codespaces (GitHub REST API Client v0.1.1)

Provides API endpoints related to codespaces

Link to this section Summary

Functions

Add selected repository to an organization secret

Create a codespace for the authenticated user

Create or update an organization secret

Create or update a secret for the authenticated user

Remove users from Codespaces access for an organization

Delete a codespace for the authenticated user

Delete an organization secret

Delete a secret for the authenticated user

Export a codespace for the authenticated user

List codespaces for a user in organization

Get a codespace for the authenticated user

Get an organization public key

Get public key for the authenticated user

Get a repository public key

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 secrets for the authenticated user

List selected repositories for an organization secret

Create a repository from an unpublished codespace

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 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

Link to this function

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 codespace secret. You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. GitHub Apps must have write access to the codespaces_user_secrets user permission and write access to the codespaces_secrets repository permission on the referenced repository to use this endpoint.

resources

Resources

Link to this function

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 secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

codespace_machines_for_authenticated_user(codespace_name, opts \\ [])

View Source
@spec codespace_machines_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, GitHub.Error.t()}

List machine types for a codespace

List the machine types a codespace can transition to use.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have read access to the codespaces_metadata repository permission to use this endpoint.

resources

Resources

Link to this function

create_for_authenticated_user(body, opts \\ [])

View Source
@spec create_for_authenticated_user(
  map(),
  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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces repository permission to use this endpoint.

resources

Resources

Link to this function

create_or_update_org_secret(org, secret_name, body, opts \\ [])

View Source
@spec create_or_update_org_secret(String.t(), String.t(), map(), keyword()) ::
  {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}

Create or update an organization secret

Creates or updates an organization secret with an encrypted value. Encrypt your secret using LibSodium. For more information, see "Encrypting secrets for the REST API."

You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

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(),
  map(),
  keyword()
) ::
  {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}

Create or update a repository secret

Creates or updates a repository secret with an encrypted value. Encrypt your secret using LibSodium. For more information, see "Encrypting secrets for the REST API."

You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.

resources

Resources

Link to this function

create_or_update_secret_for_authenticated_user(secret_name, body, opts \\ [])

View Source
@spec create_or_update_secret_for_authenticated_user(String.t(), map(), keyword()) ::
  {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}

Create or update a secret for the authenticated user

Creates or updates a 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."

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must also have Codespaces access to use this endpoint.

GitHub Apps must have write access to the codespaces_user_secrets user permission and codespaces_secrets repository permission on all referenced repositories to use this endpoint.

resources

Resources

Link to this function

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(),
  map() | 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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces repository permission to use this endpoint.

resources

Resources

Link to this function

create_with_repo_for_authenticated_user(owner, repo, body, opts \\ [])

View Source
@spec create_with_repo_for_authenticated_user(
  String.t(),
  String.t(),
  map() | 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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces repository permission to use this endpoint.

resources

Resources

Link to this function

delete_codespaces_access_users(org, body, opts \\ [])

View Source
@spec delete_codespaces_access_users(String.t(), map(), 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."

You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

delete_for_authenticated_user(codespace_name, opts \\ [])

View Source
@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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces repository permission to use this endpoint.

resources

Resources

Link to this function

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.

You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

delete_org_secret(org, secret_name, opts \\ [])

View Source
@spec delete_org_secret(String.t(), String.t(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Delete an organization secret

Deletes an organization secret using the secret name. You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

delete_repo_secret(owner, repo, secret_name, opts \\ [])

View Source
@spec delete_repo_secret(String.t(), String.t(), String.t(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Delete a repository secret

Deletes a secret in a repository using the secret name. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.

resources

Resources

Link to this function

delete_secret_for_authenticated_user(secret_name, opts \\ [])

View Source
@spec delete_secret_for_authenticated_user(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete a secret for the authenticated user

Deletes a 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.

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.

GitHub Apps must have write access to the codespaces_user_secrets user permission to use this endpoint.

resources

Resources

Link to this function

export_for_authenticated_user(codespace_name, opts \\ [])

View Source
@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.

You must authenticate using a personal access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces_lifecycle_admin repository permission to use this endpoint.

resources

Resources

Link to this function

get_codespaces_for_user_in_org(org, username, opts \\ [])

View Source
@spec get_codespaces_for_user_in_org(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {: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.

You must authenticate using an access token with the admin:org scope to use this endpoint.

options

Options

  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

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.

You must authenticate using a personal access token with the codespace scope to use this endpoint.

GitHub Apps must have read access to the codespaces_lifecycle_admin repository permission to use this endpoint.

resources

Resources

Link to this function

get_for_authenticated_user(codespace_name, opts \\ [])

View Source
@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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have read access to the codespaces repository permission to use this endpoint.

resources

Resources

Link to this function

get_org_public_key(org, opts \\ [])

View Source
@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. You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

get_org_secret(org, secret_name, opts \\ [])

View Source
@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 secret without revealing its encrypted value. You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

get_public_key_for_authenticated_user(opts \\ [])

View Source
@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.

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.

GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint.

resources

Resources

Link to this function

get_repo_public_key(owner, repo, opts \\ [])

View Source
@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 you must use an access token with the repo scope. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.

resources

Resources

Link to this function

get_repo_secret(owner, repo, secret_name, opts \\ [])

View Source
@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 secret without revealing its encrypted value. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.

resources

Resources

Link to this function

get_secret_for_authenticated_user(secret_name, opts \\ [])

View Source
@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 secret available to a user's codespaces without revealing its encrypted value.

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.

GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint.

resources

Resources

Link to this function

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, map()} | {: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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have read access to the codespaces_metadata repository permission to use this endpoint.

options

Options

  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_for_authenticated_user(opts \\ [])

View Source
@spec list_for_authenticated_user(keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List codespaces for the authenticated user

Lists the authenticated user's codespaces.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have read access to the codespaces repository permission to use this endpoint.

options

Options

  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.
  • repository_id: ID of the Repository to filter on

resources

Resources

Link to this function

list_in_organization(org, opts \\ [])

View Source
@spec list_in_organization(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, GitHub.Error.t()}

List codespaces for the organization

Lists the codespaces associated to a specified organization.

You must authenticate using an access token with the admin:org scope to use this endpoint.

options

Options

  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_in_repository_for_authenticated_user(owner, repo, opts \\ [])

View Source
@spec list_in_repository_for_authenticated_user(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {: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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have read access to the codespaces repository permission to use this endpoint.

options

Options

  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_org_secrets(org, opts \\ [])

View Source
@spec list_org_secrets(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, GitHub.Error.t()}

List organization secrets

Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. You must authenticate using an access token with the admin:org scope to use this endpoint.

options

Options

  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_repo_secrets(owner, repo, opts \\ [])

View Source
@spec list_repo_secrets(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List repository secrets

Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.

options

Options

  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_repositories_for_secret_for_authenticated_user(secret_name, opts \\ [])

View Source
@spec list_repositories_for_secret_for_authenticated_user(
  String.t(),
  keyword()
) :: {:ok, map()} | {: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 codespace secret.

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.

GitHub Apps must have read access to the codespaces_user_secrets user permission and write access to the codespaces_secrets repository permission on all referenced repositories to use this endpoint.

resources

Resources

Link to this function

list_secrets_for_authenticated_user(opts \\ [])

View Source
@spec list_secrets_for_authenticated_user(keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List secrets for the authenticated user

Lists all secrets available for a user's Codespaces without revealing their encrypted values.

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.

GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint.

options

Options

  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_selected_repos_for_org_secret(org, secret_name, opts \\ [])

View Source
@spec list_selected_repos_for_org_secret(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {: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. You must authenticate using an access token with the admin:org scope to use this endpoint.

options

Options

  • page: Page number of the results to fetch.
  • per_page: The number of results per page (max 100).

resources

Resources

Link to this function

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, map()} | {:error, GitHub.Error.t()}

Get default attributes for a codespace

Gets the default attributes for codespaces created by the user with the repository.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces repository permission 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

Link to this function

publish_for_authenticated_user(codespace_name, body, opts \\ [])

View Source
@spec publish_for_authenticated_user(String.t(), map(), 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.

You must authenticate using a personal access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces repository permission to use this endpoint.

resources

Resources

Link to this function

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 codespace secret. You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. GitHub Apps must have write access to the codespaces_user_secrets user permission to use this endpoint.

resources

Resources

Link to this function

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 secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

repo_machines_for_authenticated_user(owner, repo, opts \\ [])

View Source
@spec repo_machines_for_authenticated_user(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List available machine types for a repository

List the machine types available for a given repository based on its configuration.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces_metadata repository permission 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 request
  • ref: The branch or commit to check for prebuild availability and devcontainer restrictions.

resources

Resources

Link to this function

set_codespaces_access(org, body, opts \\ [])

View Source
@spec set_codespaces_access(String.t(), map(), 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. You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

set_codespaces_access_users(org, body, opts \\ [])

View Source
@spec set_codespaces_access_users(String.t(), map(), 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."

You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

set_repositories_for_secret_for_authenticated_user(secret_name, body, opts \\ [])

View Source
@spec set_repositories_for_secret_for_authenticated_user(String.t(), map(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Set selected repositories for a user secret

Select the repositories that will use a user's codespace secret.

You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.

GitHub Apps must have write access to the codespaces_user_secrets user permission and write access to the codespaces_secrets repository permission on all referenced repositories to use this endpoint.

resources

Resources

Link to this function

set_selected_repos_for_org_secret(org, secret_name, body, opts \\ [])

View Source
@spec set_selected_repos_for_org_secret(String.t(), String.t(), map(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Set selected repositories for an organization secret

Replaces all repositories for an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

start_for_authenticated_user(codespace_name, opts \\ [])

View Source
@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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces_lifecycle_admin repository permission to use this endpoint.

resources

Resources

Link to this function

stop_for_authenticated_user(codespace_name, opts \\ [])

View Source
@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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces_lifecycle_admin repository permission to use this endpoint.

resources

Resources

Link to this function

stop_in_organization(org, username, codespace_name, opts \\ [])

View Source
@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.

You must authenticate using an access token with the admin:org scope to use this endpoint.

resources

Resources

Link to this function

update_for_authenticated_user(codespace_name, body, opts \\ [])

View Source
@spec update_for_authenticated_user(String.t(), map(), 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.

You must authenticate using an access token with the codespace scope to use this endpoint.

GitHub Apps must have write access to the codespaces repository permission to use this endpoint.

resources

Resources