gitee事件

gitee事件类型 #

类型
PushEvent
IssueEvent
PullRequestEvent
NoteEvent

PushEvent #

属性 类型 说明
hook_id int 钩子ID
hook_url string 钩子路由
hook_name string 钩子名,固定为 push_hooks/tag_push_hooks
timestamp long 触发钩子的时间戳
sign string 钩子根据密钥计算的签名。
ref string 推送的分支
before string 推送前分支的 commit
after string 推送后分支的 commit
total_commits_count int 推送包含的 commit 总数
commits_more_than_ten bool 推送包含的 commit 总数是否大于十二
created bool 推送的是否是新分支。
deleted bool 推送的是否是删除分支。
compare string 推送的 commit 差异
commits Commit[] 推送的全部 commit 信息。
head_commit Commit 推送最前面的 commit 信息。
project Project[] 推送的目标仓库信息。
user_id int 用户ID
user_name string 推送者的昵称。
user User[] 推送者的用户信息。
pusher User[] 推送者的用户信息。
sender User[] 推送者的用户信息。
enterprise Enterprise[] 推送的目标仓库所在的企业信息

IssueEvent #

属性 类型 说明
hook_id int 钩子ID
hook_url string 钩子路由
hook_name string 钩子名,固定为 issue_hooks。
timestamp long 触发钩子的时间戳
sign string 钩子根据密钥计算的签名。
action string issue 状态。
issue Issue[] issue 信息。
project Project[] 仓库信息。
sender User[] 触发 hook 的用户信息。
target_user User[] 被委托处理 issue 的用户信息。
user User[] issue 创建者。
assignee User[] issue 负责人。
updated_by User[] 触发 hook 的用户信息。
iid string issue 对应的标识。
title string issue 标题。
description string issue 的内容体。
state string issue 状态。
milestone string 里程碑的标题。
url string issue 在 Gitee 上对应的地址。
enterprise Enterprise[] issue 所属的企业信息。

PullRequestEvent #

属性 类型 说明
hook_id int 钩子ID
hook_url string 钩子路由
hook_name string 钩子名,固定为 merge_request_hooks。
timestamp long 触发钩子的时间戳
sign string 钩子根据密钥计算的签名。
action string PR 状态。
pull_request PullRequest[] PR 的信息。
number int PR ID
iid int 与上面 number 一致。
title string PR 的标题。
body string[] PR 的内容。
state string PR 状态。
merge_status string PR 的合并状态。
merge_commit_sha string PR 合并产生的 commit
url string PR 在 Gitee 上 url。
source_branch string PR 的源分支名
source_repo Project[] PR 的源仓库信息。
target_branch string PR 的目标分支名。
target_repo Project[] PR 的目标仓库信息
project Project[] PR 的目标仓库信息。
author User[] PR 的创建者信息。
updated_by User[] PR 的更新者信息。
sender User[] PR 的更新者信息。
target_user User[] 被委托处理 PR 的用户信息。
enterprise Enterprise[] PR 仓库所属的企业信息。

NoteEvent #

属性 类型 说明
hook_id int 钩子ID
hook_url string 钩子路由
hook_name string 钩子名,固定为 note_hooks。
timestamp long 触发钩子的时间戳
sign string 钩子根据密钥计算的签名。
action string 评论的动作。
comment Note 评论的数据信息。
project Project[] 评论所在仓库的信息。
author User[] 评论的作者信息。
sender User[] 评论的作者信息。
url string 这条评论在 Gitee 上的地址
note string 评论内容。
noteable_type string 被评论的目标类型
noteable_id int 被评论的目标 ID。
issue Issue[] 被评论的 Issue 信息。
pull_request PullRequest[] 被评论的 PR 信息。
title string 被评论的目标标题。
per_iid string 被评论的目标标识。
short_commit_id string[] 被评论的 commit 提交中的简短 sha。
enterprise Enterprise[] 被评论的目标所在的企业信息。

通用结构 #

User #

属性 类型 说明
id int[] 用户ID
name string 用户的昵称。
email string 用户的邮箱。
username string 用户账号。
url string 用户的 Gitee 个人主页 url。
login string 用户账号。
avatar_url string[] 用户头像 url。
html_url string[] 用户的 Gitee 个人主页 url。
type_str string[] 用户类型,目前固定为 User。
site_admin bool 是否是管理员。
time long[] git commit 中的时间。
remark string[] 用户备注名。

Project #

属性 类型 说明
id int 仓库ID
name string 仓库名称
path string 仓库所属的空间地址。
full_name string 完整的名字,name + path。
owner User[] 仓库的所有者。
private_flag bool 是否公开。
html_url string 对应 Gitee 的 url。
url string 对应 Gitee 的 url。
description string 仓库描述。
fork bool 是不是 fork 仓库。
created_at long 仓库的创建时间。
updated_at long 仓库的更新时间。
pushed_at long 仓库的最近一次推送时间。
git_url string 仓库的 git 地址。
ssh_url string 仓库的 ssh 地址。
clone_url string 仓库的 clone 地址。
svn_url string 仓库的 svn 地址。
git_http_url string 仓库的 clone 地址。
git_ssh_url string 仓库的 ssh 地址。
git_svn_url string 仓库的 svn 地址。
homepage string[] 仓库的网页主页。
stargazers_count int 仓库的 star 数量。
watchers_count int 仓库的 watch 数量。
forks_count int 仓库的 fork 数量。
language string 仓库的编程语言。
has_issues bool 仓库是否开启了 issue 功能。
has_wiki bool 仓库是否开启了 wiki 功能。
has_pages bool 仓库是否开启了 page 服务。
license string[] 仓库的开源协议。
open_issues_count int 仓库开启状态的 issue 总数。
default_branch string 仓库的默认分支。
namespace string 仓库所属的 Gitee 地址。
name_with_namespace string 完整的名字,name + path。
path_with_namespace string 仓库的在 Gitee 的资源唯一标识。

Commit #

属性 类型 说明
id string commit ID
tree_id string commit tree oid。
parent_ids string[] commit parent_ids。
msg string commit 的信息。
timestamp long commit 的时间
url string commit 对应的 Gitee url。
author User[] 作者信息。
committer User[] 提交者信息。
distinct bool 特殊的 commit,没任何改动。
added string[] 新加入的文件名。
removed string[] 被移除的文件名。
modified string[] 修改过的文件名。

Enterprise #

属性 类型 说明
name string 企业名。
url string 企业在 Gitee 上的 url。

Label #

属性 类型 说明
id int 标签ID
name string 标签名。
color string 标签的颜色。

Milestone #

属性 类型 说明
id int 里程碑ID
number int 里程碑ID
html_url string Gitee 上对应的url。
title string 里程碑的标题。
description string 里程碑的详细描述。
open_issues int 开启状态的 issue 数量
closed_issues int 关闭状态的 issue 数量
state string 里程碑的状态。
created_at long 里程碑创建的时间。
updated_at long 里程碑更新的时间。
due_on long[] 里程碑结束的时间。

Issue #

属性 类型 说明
id int issue ID
number int issue ID
html_url string Gitee 上对应的 url。
title string issue 标题。
user User[] issue 创建者。
labels Label[] issue 对应的标签。
state string issue 状态。
state_name string issue 状态名。
type_name string issue 类型。
assignee User[] issue 负责人。
collaborators User[] issue 协助者。
milestone Milestone[] issue 所属的里程碑。
comments int issue 的评论总数。
created_at long issue 的创建时间。
updated_at long issue 的更新时间。
body string issue 的内容。

Note #

属性 类型 说明
id int 评论ID
body string 评论内容。
user User[] 评论的作者信息。
created_at long 评论的创建时间。
updated_at long 评论的更新时间。
html_url string 这条评论在 Gitee 上的url。
position string[] 在代码 commit 评论中对应的代码位置。
commit_id string[] 在代码 commit 评论中对应的 commit ID

Branch #

属性 类型 说明
label string 分支标记。
ref string 分支名。
sha string git 提交记录中 sha 值。
user string 分支所在仓库的所有者信息
repo Project[] 分支所在仓库信息

PullRequest #

属性 类型 说明
id int PR ID
number int PR ID
state string PR 状态
html_url string PR 在 Gitee 上 url。
diff_url string PR diff 信息 url。
patch_url string PR patch 信息 url。
title string PR 的标题。
body string[] PR 的内容。
created_at long PR 的创建时间。
updated_at long PR 的更新时间。
closed_at long[] PR 的关闭时间。
merged_at long[] PR 的合并时间。
merge_commit_sha string PR 合并产生的 commit id。
merge_reference_name string PR 的源分支目标。
user User[] PR 的创建者。
assignee User[] PR 的负责人。
assignees User[] PR 的审核人。
tester User[] PR 的测试者。
testers User[] PR 的所有测试者。
need_test bool PR 是否需要测试。
need_review bool PR 是否需要审核。
milestone Milestone[] PR 所属的里程碑。
head Branch[] PR 的源分支。
base Branch[] PR 要合并的目标分支
merged bool PR 是否已合并。
mergeable bool PR 是否可以合并。
merge_status string PR 的合并状态。
updated_by User[] PR 的修改者。
comments int PR 的总评论数量。
commits int PR 的总 commit 数量。
additions int PR 新增了多少行。
deletions int PR 删除了多少行。
changed_files int PR 修改了多少行。