跳到主要内容

Commit Event

推送事件参数说明。

参数说明

参数名称参数类型参数说明
object_kindstring事件类型,此处为 "push" 表示推送事件
event_namestring事件名称,与 object_kind 相同,表示推送事件
beforestring推送前的提交 SHA 值
afterstring推送后的提交 SHA 值
refstringGit 引用路径,例如 "refs/heads/main" 表示主分支
checkout_shastring检出的提交 SHA 值
messagestring消息内容
user_idinteger触发推送事件的用户 ID
user_namestring用户的显示名称
user_usernamestring用户的用户名
user_emailstring用户的邮箱地址
user_avatarstring用户头像的 URL 地址
project_idinteger项目的唯一标识符
project.idinteger项目 ID
project.namestring项目名称
project.descriptionstring项目描述
project.web_urlstring项目的 Web 访问地址
project.avatar_urlstring项目头像的 URL 地址
project.git_ssh_urlstring项目的 SSH 克隆地址
project.git_http_urlstring项目的 HTTP 克隆地址
project.namespacestring项目的命名空间
project.visibility_levelinteger项目可见性级别(0: 私有, 1:公开)
project.path_with_namespacestring带命名空间的项目路径
project.default_branchstring项目的默认分支
project.homepagestring项目主页 URL
project.urlstring项目 Git 仓库 URL
project.ssh_urlstring项目 SSH 克隆 URL
project.http_urlstring项目 HTTP 克隆 URL
commits[].idstring提交的 SHA 值
commits[].messagestring提交信息
commits[].timestampstring提交时间戳
commits[].urlstring提交详情页面的 URL
commits[].author.namestring提交作者的名称
commits[].author.emailstring提交作者的邮箱
commits[].addedarray本次提交新增的文件列表
commits[].removedarray本次提交删除的文件列表
commits[].modifiedarray本次提交修改的文件列表
total_commits_countinteger本次推送的提交总数
push_optionsarray推送选项数组
repository.namestring仓库名称
repository.urlstring仓库 Git URL
repository.descriptionstring仓库描述
repository.homepagestring仓库主页 URL
repository.git_http_urlstring仓库 HTTP 克隆地址
repository.git_ssh_urlstring仓库 SSH 克隆地址
repository.visibility_levelinteger仓库可见性级别(0: 私有, 1: 公开)
git_branchstring推送的目标分支名称
git_commit_nostring最新提交的 SHA 值
manual_buildboolean是否为手动构建
uuidstring本次推送事件的唯一标识符