Skip to main content

repo_immutable_releases

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

Overview

Namerepo_immutable_releases
TypeResource
Idgithub.repos.repo_immutable_releases

Fields

The following fields are returned by SELECT queries:

Response if immutable releases are enabled

NameDatatypeDescription
enabledbooleanWhether immutable releases are enabled for the repository.
enforced_by_ownerbooleanWhether immutable releases are enforced by the repository owner.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
check_immutable_releasesselectowner, repoShows whether immutable releases are enabled or disabled. Also identifies whether immutability is being
enforced by the repository owner. The authenticated user must have admin read access to the repository.
enable_immutable_releasesreplaceowner, repoEnables immutable releases for a repository. The authenticated user must have admin access to the repository.
disable_immutable_releasesdeleteowner, repoDisables immutable releases for a repository. The authenticated user must have admin access to the repository.

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
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

SELECT examples

Shows whether immutable releases are enabled or disabled. Also identifies whether immutability is being
enforced by the repository owner. The authenticated user must have admin read access to the repository.

SELECT
enabled,
enforced_by_owner
FROM github.repos.repo_immutable_releases
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;

REPLACE examples

Enables immutable releases for a repository. The authenticated user must have admin access to the repository.

REPLACE github.repos.repo_immutable_releases
SET
-- No updatable properties
WHERE
owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required;

DELETE examples

Disables immutable releases for a repository. The authenticated user must have admin access to the repository.

DELETE FROM github.repos.repo_immutable_releases
WHERE owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
;