class ReleasesClient

Class Releases.

Traits

Properties

protected $curl from CICommon
protected $api_url from CICommon

Methods

__construct(Curl $curl, string $api_url)

CICommon constructor.

from CICommon
mixed
list(string $repo_full_name)

No description

mixed
get(string $repo_full_name, int|null $release_id, string|null $tag_name)

Get a single release.

mixed
latest(string $repo_full_name)

Get the latest release.

mixed
getByTag(string $repo_full_name, string $tag_name)

Get a release by tag name.

void
create(string $repo_full_name, string $tag_name, string $target_commitish, string $name, string $body, bool $draft = false, bool $prerelease = false, $method = 'post')

201.

void
edit(string $repo_full_name, string $tag_name, string $target_commitish, string $name, string $body, bool $draft = false, bool $prerelease = false, $method = 'patch')

Edit a release.

void
delete(string $repo_full_name, int|null $release_id, string|null $tag_name)

Delete a release.

mixed
listAssets(string $repo_full_name, int|null $release_id, string|null $tag_name)

List assets for a release.

mixed
uploadAsset(string $repo_full_name, $file_content, int|null $release_id, string|null $tag_name, string $name, string|null $label, string $content_type = 'application/octet-stream', bool $replace = false)

Upload a release asset.

mixed
getAsset(string $repo_full_name, int $asset_id)

Get a single release asset.

void
editAsset(string $repo_full_name, string $name, string $label, int $asset_id)

Edit a release asset.

void
deleteAsset(string $repo_full_name, int $asset_id)

Delete a release asset.

Details

in CICommon at line 18
__construct(Curl $curl, string $api_url)

CICommon constructor.

Parameters

Curl $curl
string $api_url

at line 23
mixed list(string $repo_full_name)

Parameters

string $repo_full_name

Return Value

mixed

Exceptions

Exception

at line 40
mixed get(string $repo_full_name, int|null $release_id, string|null $tag_name)

Get a single release.

Parameters

string $repo_full_name
int|null $release_id
string|null $tag_name

Return Value

mixed

Exceptions

Exception

at line 58
mixed latest(string $repo_full_name)

Get the latest release.

Parameters

string $repo_full_name

Return Value

mixed

Exceptions

Exception

at line 72
mixed getByTag(string $repo_full_name, string $tag_name)

Get a release by tag name.

Parameters

string $repo_full_name
string $tag_name

Return Value

mixed

Exceptions

Exception

at line 89
void create(string $repo_full_name, string $tag_name, string $target_commitish, string $name, string $body, bool $draft = false, bool $prerelease = false, $method = 'post')

201.

Parameters

string $repo_full_name
string $tag_name
string $target_commitish
string $name
string $body
bool $draft
bool $prerelease
$method

Return Value

void

Exceptions

Exception

at line 121
void edit(string $repo_full_name, string $tag_name, string $target_commitish, string $name, string $body, bool $draft = false, bool $prerelease = false, $method = 'patch')

Edit a release.

Parameters

string $repo_full_name
string $tag_name
string $target_commitish
string $name
string $body
bool $draft
bool $prerelease
$method

Return Value

void

Exceptions

Exception

at line 141
void delete(string $repo_full_name, int|null $release_id, string|null $tag_name)

Delete a release.

Parameters

string $repo_full_name
int|null $release_id
string|null $tag_name

Return Value

void

Exceptions

Exception

at line 162
mixed listAssets(string $repo_full_name, int|null $release_id, string|null $tag_name)

List assets for a release.

Parameters

string $repo_full_name
int|null $release_id
string|null $tag_name

Return Value

mixed

Exceptions

Exception

at line 186
mixed uploadAsset(string $repo_full_name, $file_content, int|null $release_id, string|null $tag_name, string $name, string|null $label, string $content_type = 'application/octet-stream', bool $replace = false)

Upload a release asset.

201

Parameters

string $repo_full_name
$file_content
int|null $release_id
string|null $tag_name
string $name
string|null $label
string $content_type
bool $replace

Return Value

mixed

Exceptions

Exception

at line 228
mixed getAsset(string $repo_full_name, int $asset_id)

Get a single release asset.

Parameters

string $repo_full_name
int $asset_id

Return Value

mixed

Exceptions

Exception

at line 240
void editAsset(string $repo_full_name, string $name, string $label, int $asset_id)

Edit a release asset.

Parameters

string $repo_full_name
string $name
string $label
int $asset_id

Return Value

void

Exceptions

Exception

at line 259
void deleteAsset(string $repo_full_name, int $asset_id)

Delete a release asset.

204

Parameters

string $repo_full_name
int $asset_id

Return Value

void

Exceptions

Exception