class Client

展示 CI 状态

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, string $sha, string $ref, string $task, string $environment)

List deployments.

mixed
getSingleInfo(string $repo_full_name, string $id)

Get a single deployment.

void
create(string $repo_full_name, string $ref, string $task = 'deploy', bool $auto_merge = true, array $required_contexts = null, string $payload = null, string $environment = 'production', string $description = null, bool $transient_environment = null, bool $production_environment = null)

Create a deployment.

mixed
getStatus(string $repo_full_name, string $id)

List deployment statuses.

mixed
getSingleStatus(string $repo_full_name, string $id, string $statusId)

Get a single deployment status.

mixed
createStatus(string $repo_full_name, string $id, string $state, string $log_url = null, string $description = null, string $environment = 'production', string $environment_url = null, bool $auto_inactive = true)

Create a deployment status.

Details

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

CICommon constructor.

Parameters

Curl $curl
string $api_url

at line 32
mixed list(string $repo_full_name, string $sha, string $ref, string $task, string $environment)

List deployments.

Parameters

string $repo_full_name
string $sha
string $ref
string $task
string $environment

Return Value

mixed

Exceptions

Exception

at line 51
mixed getSingleInfo(string $repo_full_name, string $id)

Get a single deployment.

Parameters

string $repo_full_name
string $id

Return Value

mixed

Exceptions

Exception

at line 66
void create(string $repo_full_name, string $ref, string $task = 'deploy', bool $auto_merge = true, array $required_contexts = null, string $payload = null, string $environment = 'production', string $description = null, bool $transient_environment = null, bool $production_environment = null)

Create a deployment.

Parameters

string $repo_full_name
string $ref
string $task
bool $auto_merge
array $required_contexts
string $payload
string $environment
string $description
bool $transient_environment
bool $production_environment

Return Value

void

Exceptions

Exception

at line 96
mixed getStatus(string $repo_full_name, string $id)

List deployment statuses.

Parameters

string $repo_full_name
string $id

Return Value

mixed

Exceptions

Exception

at line 113
mixed getSingleStatus(string $repo_full_name, string $id, string $statusId)

Get a single deployment status.

Parameters

string $repo_full_name
string $id
string $statusId

Return Value

mixed

Exceptions

Exception

at line 135
mixed createStatus(string $repo_full_name, string $id, string $state, string $log_url = null, string $description = null, string $environment = 'production', string $environment_url = null, bool $auto_inactive = true)

Create a deployment status.

201

Parameters

string $repo_full_name
string $id
string $state
string $log_url
string $description
string $environment
string $environment_url
bool $auto_inactive

Return Value

mixed

Exceptions

Exception