class Client

Traits

Properties

protected $curl from CICommon
protected $api_url from CICommon

Methods

__construct(Curl $curl, string $api_url)

CICommon constructor.

from CICommon
mixed
getBlobs(string $repo_full_name, string $file_sha)

Get a blob.

void
createBlobs(string $repo_full_name, string $content, string $encoding = 'utf-8')

Create a blob.

mixed
getCommits(string $repo_full_name, string $sha)

Get a commit.

mixed
createCommit(string $repo_full_name, string $commit_message, string $tree, array $parents, string $committer_name, string $committer_email, string $date, string $signature)

Create a commit.

mixed
commitSignatureVerification(string $repo_full_name, string $sha)

Commit signature verification.

mixed
getRef(string $repo_full_name, string $ref)

Get a reference.

mixed
allRef(string $repo_full_name, bool $tags = false)

Get all references.

mixed
createRef(string $repo_full_name, string $ref, string $sha)

Create a reference.

mixed
updateRef(string $repo_full_name, string $ref, string $sha, bool $force)

Update a reference.

void
deleteRef(string $repo_full_name, string $ref)

Delete a reference.

mixed
getTag(string $repo_full_name, $tag_sha)

Get a tag.

void
createTag(string $repo_full_name, string $tag_name, string $tag_message, string $object, string $type, string|null $committer_name, string|null $committer_email, string|null $date)

Create a tag object.

mixed
tagSignatureVerification(string $repo_full_name, string $tag_sha)

Tag signature verification.

mixed
getTree(string $repo_full_name, string $tree_sha, bool $recursively = false)

Get a tree.

void
createTree(string $repo_full_name, $base_tree, array $tree)

Create a tree.

Details

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

CICommon constructor.

Parameters

Curl $curl
string $api_url

at line 20
mixed getBlobs(string $repo_full_name, string $file_sha)

Get a blob.

Parameters

string $repo_full_name
string $file_sha

Return Value

mixed

Exceptions

Exception

at line 36
void createBlobs(string $repo_full_name, string $content, string $encoding = 'utf-8')

Create a blob.

201

Parameters

string $repo_full_name repo full name
string $content the new blob's content
string $encoding utf-8 or base64

Return Value

void

Exceptions

Exception

at line 51
mixed getCommits(string $repo_full_name, string $sha)

Get a commit.

Parameters

string $repo_full_name
string $sha

Return Value

mixed

Exceptions

Exception

at line 65
mixed createCommit(string $repo_full_name, string $commit_message, string $tree, array $parents, string $committer_name, string $committer_email, string $date, string $signature)

Create a commit.

201

Parameters

string $repo_full_name
string $commit_message
string $tree
array $parents
string $committer_name
string $committer_email
string $date
string $signature

Return Value

mixed

Exceptions

Exception

at line 101
mixed commitSignatureVerification(string $repo_full_name, string $sha)

Commit signature verification.

Parameters

string $repo_full_name
string $sha

Return Value

mixed

Exceptions

Exception

at line 116
mixed getRef(string $repo_full_name, string $ref)

Get a reference.

Parameters

string $repo_full_name repo full name
string $ref heads/skunkworkz/featureA

Return Value

mixed

Exceptions

Exception

at line 128
mixed allRef(string $repo_full_name, bool $tags = false)

Get all references.

Parameters

string $repo_full_name
bool $tags

Return Value

mixed

Exceptions

Exception

at line 149
mixed createRef(string $repo_full_name, string $ref, string $sha)

Create a reference.

201

Parameters

string $repo_full_name
string $ref
string $sha

Return Value

mixed

Exceptions

Exception

at line 166
mixed updateRef(string $repo_full_name, string $ref, string $sha, bool $force)

Update a reference.

Parameters

string $repo_full_name
string $ref
string $sha
bool $force

Return Value

mixed

Exceptions

Exception

at line 188
void deleteRef(string $repo_full_name, string $ref)

Delete a reference.

204

Parameters

string $repo_full_name repo full name
string $ref heads/feature-a tags/v1.0

Return Value

void

Exceptions

Exception

at line 204
mixed getTag(string $repo_full_name, $tag_sha)

Get a tag.

Parameters

string $repo_full_name
$tag_sha

Return Value

mixed

Exceptions

Exception

at line 216
void createTag(string $repo_full_name, string $tag_name, string $tag_message, string $object, string $type, string|null $committer_name, string|null $committer_email, string|null $date)

Create a tag object.

201

Parameters

string $repo_full_name
string $tag_name
string $tag_message
string $object
string $type
string|null $committer_name
string|null $committer_email
string|null $date

Return Value

void

Exceptions

Exception

at line 252
mixed tagSignatureVerification(string $repo_full_name, string $tag_sha)

Tag signature verification.

Parameters

string $repo_full_name
string $tag_sha

Return Value

mixed

Exceptions

Exception

at line 264
mixed getTree(string $repo_full_name, string $tree_sha, bool $recursively = false)

Get a tree.

Parameters

string $repo_full_name
string $tree_sha
bool $recursively

Return Value

mixed

Exceptions

Exception

at line 284
void createTree(string $repo_full_name, $base_tree, array $tree)

Create a tree.

201

Parameters

string $repo_full_name repo full name
$base_tree
array $tree [['path'='file.name','mode'=>'100644','type'=>'blob','sha'=>$sha]]

Return Value

void

Exceptions

Exception