class Build extends Model

Constants

CREATED_AT

UPDATED_AT

Properties

static protected $table from Model
static protected $set_array from Model
static protected $primaryKey from Model
static protected $incrementing from Model
static protected $keyType 如果主键不是一个整数,则应该在模型上设置 string. from Model
static protected $timestamps 默认数据表中存在 created_at 和 updated_at 这两个字段. from Model
static protected $connection from Model

Methods

static void
chunk(int $count, Closure $closer)

结果分块.

from Model
static array|string
all()

取得所有数据.

from Model
static int|array
find(int $table_primary_key_id)

通过主键查找数据.

from Model
static void
first()

取回符合查询限制的第一个模型 .

from Model
static array|int
findOrFail(int|array $table_primary_key_id)

通过主键查找数据,找不到则抛出异常.

from Model
static void
firstOrFail()

No description

from Model
static string|null
getTableName()

No description

from Model
void
save()

No description

from Model
void
__set($name, $value)

No description

from Model
static array|string
getLastKeyId()

No description

from Model
static void
destroy(int|array $primaryKeyValue)

No description

from Model
static 
getData(int $buildId = 0)

No description

static void
deleteByBranch(string $branch, int $rid, $gitType = 'github')

No description

static string
getStartAt(int $build_key_id)

No description

static void
updateStartAt(int $build_key_id, int|null $time)

No description

static string
getStopAt(int $build_key_id)

No description

static void
updateFinishedAt(int $buildId)

No description

static string
getGitType(int $build_key_id)

No description

static int
getRid(int $build_key_id)

No description

static int
updateBuildStatus(int $build_key_id, string|null $status)

No description

static array|string
getBuildStatus(int $build_key_id)

No description

static int
updateBuildStatusByCommitId(string $build_status, int $rid, string $branch, string $commit_id, $git_type = 'github')

No description

static string
getLastBuildStatus(int $rid, string $branch)

No description

static bool
buildStatusIsChanged(int $rid, string $branch)

No description

static array
getBranches(int $rid, $git_type = 'github')

No description

static string
getCurrentBuildKeyId(int $rid, $git_type = 'github')

某仓库最新的一次构建 ID PR 除外.

static string
getConfig(int $build_key_id)

No description

static string
getBuildStatusByBuildKeyId(int $build_key_id)

No description

static string
getBranch($build_key_id)

No description

static array
allByBranch(int $rid, string $branch_name, int|null $before, int|null $limit, $git_type = 'github')

某分支的构建列表.

static array
allByRid(int $rid, int|null $before, int|null $limit, bool $pr, $all = false, $git_type = 'github')

某仓库的构建列表.

static array
allByAdmin(int $uid, int|null $before, int|null $limit, $git_type = 'github')

某用户的构建列表.

static array
getCommitterEmail(int $build_key_id)

No description

static array
getCommitterName(int $build_key_id)

No description

static int
insertTag($branch, $tag, $commit_id, $commit_message, $committer_name, $committer_email, $committer_username, $author_name, $author_email, $author_username, $rid, $event_time, $config, $git_type = 'github')

No description

static int
insert($event_type, $branch, $compare, $commit_id, $commit_message, $committer_name, $committer_email, $committer_username, $author_name, $author_email, $author_username, $rid, $event_time, $config, $git_type = 'github', bool $unique = false)

No description

static int
insertPing($rid, $created_at, $git_type = 'github')

No description

static int
insertPullRequest($event_time, string $action, string $commit_id, string $commit_message, int $committer_uid, string $committer_username, $pull_request_number, string $branch, $rid, string $config, $internal, $pull_request_source, $git_type = 'github')

No description

static void
updateCheckSuiteId(int $rid, string $commit_id, int $check_suite_id, string $git_type = 'github')

No description

static void
deleteLog(int $buildId)

No description

Details

in Model at line 39
static void chunk(int $count, Closure $closer)

结果分块.

Parameters

int $count
Closure $closer

Return Value

void

in Model at line 50
static array|string all()

取得所有数据.

Return Value

array|string

Exceptions

Exception

in Model at line 68
static int|array find(int $table_primary_key_id)

通过主键查找数据.

Parameters

int $table_primary_key_id

Return Value

int|array

Exceptions

Exception

in Model at line 86
static void first()

取回符合查询限制的第一个模型 .

..

Return Value

void

in Model at line 99
static array|int findOrFail(int|array $table_primary_key_id)

通过主键查找数据,找不到则抛出异常.

Parameters

int|array $table_primary_key_id

Return Value

array|int

Exceptions

Exception

in Model at line 110
static void firstOrFail()

Return Value

void

in Model at line 117
static string|null getTableName()

Return Value

string|null

in Model at line 132
void save()

Return Value

void

Exceptions

Exception

in Model at line 145
void __set($name, $value)

Parameters

$name
$value

Return Value

void

in Model at line 157
static array|string getLastKeyId()

Return Value

array|string

Exceptions

Exception

in Model at line 167
static void destroy(int|array $primaryKeyValue)

Parameters

int|array $primaryKeyValue 通过主键删除数据

Return Value

void

at line 15
static getData(int $buildId = 0)

Parameters

int $buildId

at line 60
static void deleteByBranch(string $branch, int $rid, $gitType = 'github')

Parameters

string $branch
int $rid
$gitType

Return Value

void

at line 72
static string getStartAt(int $build_key_id)

Parameters

int $build_key_id

Return Value

string

Exceptions

Exception

at line 82
static void updateStartAt(int $build_key_id, int|null $time)

Parameters

int $build_key_id
int|null $time

Return Value

void

Exceptions

Exception

at line 95
static string getStopAt(int $build_key_id)

Parameters

int $build_key_id

Return Value

string

Exceptions

Exception

at line 105
static void updateFinishedAt(int $buildId)

Parameters

int $buildId

Return Value

void

Exceptions

Exception

at line 119
static string getGitType(int $build_key_id)

Parameters

int $build_key_id

Return Value

string

Exceptions

Exception

at line 131
static int getRid(int $build_key_id)

Parameters

int $build_key_id

Return Value

int

Exceptions

Exception

at line 151
static int updateBuildStatus(int $build_key_id, string|null $status)

Parameters

int $build_key_id
string|null $status

Return Value

int

Exceptions

Exception

at line 167
static array|string getBuildStatus(int $build_key_id)

Parameters

int $build_key_id

Return Value

array|string

Exceptions

Exception

at line 183
static int updateBuildStatusByCommitId(string $build_status, int $rid, string $branch, string $commit_id, $git_type = 'github')

Parameters

string $build_status
int $rid
string $branch
string $commit_id
$git_type

Return Value

int

Exceptions

Exception

at line 199
static string getLastBuildStatus(int $rid, string $branch)

Parameters

int $rid
string $branch

Return Value

string

Exceptions

Exception

at line 211
static bool buildStatusIsChanged(int $rid, string $branch)

Parameters

int $rid
string $branch

Return Value

bool

Exceptions

Exception

at line 231
static array getBranches(int $rid, $git_type = 'github')

Parameters

int $rid
$git_type

Return Value

array

Exceptions

Exception

at line 247
static string getCurrentBuildKeyId(int $rid, $git_type = 'github')

某仓库最新的一次构建 ID PR 除外.

Parameters

int $rid
$git_type

Return Value

string

Exceptions

Exception

at line 269
static string getConfig(int $build_key_id)

Parameters

int $build_key_id

Return Value

string

Exceptions

Exception

at line 287
static string getBuildStatusByBuildKeyId(int $build_key_id)

Parameters

int $build_key_id

Return Value

string

Exceptions

Exception

at line 301
static string getBranch($build_key_id)

Parameters

$build_key_id

Return Value

string

Exceptions

Exception

at line 317
static array allByBranch(int $rid, string $branch_name, int|null $before, int|null $limit, $git_type = 'github')

某分支的构建列表.

Parameters

int $rid
string $branch_name
int|null $before
int|null $limit
$git_type

Return Value

array

Exceptions

Exception

at line 354
static array allByRid(int $rid, int|null $before, int|null $limit, bool $pr, $all = false, $git_type = 'github')

某仓库的构建列表.

Parameters

int $rid
int|null $before
int|null $limit
bool $pr
$all
$git_type

Return Value

array

Exceptions

Exception

at line 403
static array allByAdmin(int $uid, int|null $before, int|null $limit, $git_type = 'github')

某用户的构建列表.

Parameters

int $uid
int|null $before
int|null $limit
$git_type

Return Value

array

Exceptions

Exception

at line 431
static array getCommitterEmail(int $build_key_id)

Parameters

int $build_key_id

Return Value

array

Exceptions

Exception

at line 443
static array getCommitterName(int $build_key_id)

Parameters

int $build_key_id

Return Value

array

Exceptions

Exception

at line 470
static int insertTag($branch, $tag, $commit_id, $commit_message, $committer_name, $committer_email, $committer_username, $author_name, $author_email, $author_username, $rid, $event_time, $config, $git_type = 'github')

Parameters

$branch
$tag
$commit_id
$commit_message
$committer_name
$committer_email
$committer_username
$author_name
$author_email
$author_username
$rid
$event_time
$config
$git_type

Return Value

int

Exceptions

Exception

at line 530
static int insert($event_type, $branch, $compare, $commit_id, $commit_message, $committer_name, $committer_email, $committer_username, $author_name, $author_email, $author_username, $rid, $event_time, $config, $git_type = 'github', bool $unique = false)

Parameters

$event_type
$branch
$compare
$commit_id
$commit_message
$committer_name
$committer_email
$committer_username
$author_name
$author_email
$author_username
$rid
$event_time
$config
$git_type
bool $unique

Return Value

int

Exceptions

Exception

at line 581
static int insertPing($rid, $created_at, $git_type = 'github')

Parameters

$rid
$created_at
$git_type

Return Value

int

Exceptions

Exception

at line 615
static int insertPullRequest($event_time, string $action, string $commit_id, string $commit_message, int $committer_uid, string $committer_username, $pull_request_number, string $branch, $rid, string $config, $internal, $pull_request_source, $git_type = 'github')

Parameters

$event_time
string $action
string $commit_id
string $commit_message
int $committer_uid
string $committer_username
$pull_request_number
string $branch
$rid
string $config
$internal
$pull_request_source
$git_type

Return Value

int

Exceptions

Exception

at line 655
static void updateCheckSuiteId(int $rid, string $commit_id, int $check_suite_id, string $git_type = 'github')

Parameters

int $rid
string $commit_id
int $check_suite_id
string $git_type

Return Value

void

Exceptions

Exception

at line 667
static void deleteLog(int $buildId)

Parameters

int $buildId

Return Value

void