Repo
class Repo extends Model
Constants
CREATED_AT |
|
UPDATED_AT |
|
Properties
static protected | $table | ||
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 string
getRid(string $username, string $repo, $git_type = 'github')
No description
static string
getDefaultBranch(string $username, string $repo, $git_type = 'github')
No description
static string
getRepoFullName(int $rid, $git_type = 'github')
No description
static string
getGitHubInstallationIdByRepoFullName(string $repo_full_name, $git_type = 'github')
No description
static string
getGitHubInstallationIdByRid(int $rid, $git_type = 'github')
No description
static string
getAdmin(int $rid, bool $collaborators = false, $git_type = 'github')
No description
static array
checkAdmin(int $rid, int $uid, bool $collaborators = false, $git_type = 'github')
No description
static void
updateAdmin(int $rid, int $uid, $git_type = 'github', bool $collaborators = false)
No description
static void
deleteAdmin(int $rid, int $uid, bool $collaborators = false, $git_type = 'github')
No description
static array
allByAdmin(int $uid, bool $collaborators = false, $git_type = 'github')
No description
static array
allByUsername(string $username, $git_type = 'github')
No description
static array
findByRepoFullName(string $username, string $repo_name, $git_type = 'github')
No description
static array
getActiveByAdmin(int $uid, bool $collaborators = false, $git_type = 'github')
No description
static string
exists(int $rid, $git_type = 'github')
No description
static void
updateRepoInfo(int $rid, string $repo_full_name, int|null $insert_admin, int|null $insert_collaborators, string $default_branch = 'master', $git_type = 'github')
No description
static int
deleteByInstallationId(int $installation_id, string $git_type = 'github')
用户卸载了 GitHub App.
static int
deleteByRid(int $rid, $git_type = 'github')
No description
static int
updateBuildActive(int $build_active, string $git_type, string $repo_full_name)
No description
static int
updateWebhookStatus(int $webhooks_status, string $git_type, string $repo_full_name)
No description
static void
active(string $repo_full_name, string $git_type = 'gitee')
No description
static void
deactive(string $repo_full_name, string $git_type = 'gitee')
No description
static bool
canBuild(string $repo_full_name, string $git_type)
No description
Details
in Model at line 50
static array|string
all()
取得所有数据.
in Model at line 68
static int|array
find(int $table_primary_key_id)
通过主键查找数据.
in Model at line 86
static void
first()
取回符合查询限制的第一个模型 .
..
in Model at line 99
static array|int
findOrFail(int|array $table_primary_key_id)
通过主键查找数据,找不到则抛出异常.
in Model at line 110
static void
firstOrFail()
in Model at line 117
static string|null
getTableName()
in Model at line 132
void
save()
in Model at line 145
void
__set($name, $value)
in Model at line 157
static array|string
getLastKeyId()
in Model at line 167
static void
destroy(int|array $primaryKeyValue)
at line 21
static string
getRid(string $username, string $repo, $git_type = 'github')
at line 37
static string
getDefaultBranch(string $username, string $repo, $git_type = 'github')
at line 53
static string
getRepoFullName(int $rid, $git_type = 'github')
at line 67
static string
getGitHubInstallationIdByRepoFullName(string $repo_full_name, $git_type = 'github')
at line 83
static string
getGitHubInstallationIdByRid(int $rid, $git_type = 'github')
at line 97
static string
getAdmin(int $rid, bool $collaborators = false, $git_type = 'github')
at line 115
static array
checkAdmin(int $rid, int $uid, bool $collaborators = false, $git_type = 'github')
at line 131
static void
updateAdmin(int $rid, int $uid, $git_type = 'github', bool $collaborators = false)
at line 161
static void
deleteAdmin(int $rid, int $uid, bool $collaborators = false, $git_type = 'github')
at line 186
static array
allByAdmin(int $uid, bool $collaborators = false, $git_type = 'github')
at line 206
static array
allByUsername(string $username, $git_type = 'github')
at line 267
static array
findByRepoFullName(string $username, string $repo_name, $git_type = 'github')
at line 281
static array
getActiveByAdmin(int $uid, bool $collaborators = false, $git_type = 'github')
at line 301
static string
exists(int $rid, $git_type = 'github')
at line 313
static void
updateRepoInfo(int $rid, string $repo_full_name, int|null $insert_admin, int|null $insert_collaborators, string $default_branch = 'master', $git_type = 'github')
at line 369
static int
deleteByInstallationId(int $installation_id, string $git_type = 'github')
用户卸载了 GitHub App.
将 repo 表中 user_full_name 与 user 表 installation_id 匹配的记录删除