Skip to main content

immutable_releases_repos

Creates, updates, deletes, gets or lists an immutable_releases_repos resource.

Overview

Nameimmutable_releases_repos
TypeResource
Idgithub.orgs.immutable_releases_repos

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
repositoriesarray
total_countinteger

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_immutable_releases_settings_repositoriesselectorgpage, per_pageList all of the repositories that have been selected for immutable releases enforcement in an organization.

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
enable_selected_repository_immutable_releases_organizationreplaceorg, repository_idAdds a repository to the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
set_immutable_releases_settings_repositoriesreplaceorg, selected_repository_idsReplaces all repositories that have been selected for immutable releases enforcement in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
disable_selected_repository_immutable_releases_organizationdeleteorg, repository_idRemoves a repository from the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.

OAuth tokens and personal access tokens (classic) need the admin:org 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
orgstringThe organization name. The name is not case sensitive.
repository_idintegerThe unique identifier of the repository.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

List all of the repositories that have been selected for immutable releases enforcement in an organization.

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

SELECT
repositories,
total_count
FROM github.orgs.immutable_releases_repos
WHERE org = '{{ org }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;

REPLACE examples

Adds a repository to the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

REPLACE github.orgs.immutable_releases_repos
SET
-- No updatable properties
WHERE
org = '{{ org }}' --required
AND repository_id = '{{ repository_id }}' --required;

DELETE examples

Removes a repository from the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

DELETE FROM github.orgs.immutable_releases_repos
WHERE org = '{{ org }}' --required
AND repository_id = '{{ repository_id }}' --required
;