Skip to main content

Webhook 设计

caution
  • Gitlab 群组 webhook 是收费的

Headers

# Gitlab
# ==========================
X-Gitlab-Token:
X-Gitlab-Event:

# hmac
X-Hub-Signature:
X-GitHub-Event:

# bitbucket
# ==========================
X-Hook-UUID:
X-Event-Key:
# bitbucket server
X-Hub-Signature:

# Gitee
# ==========================
User-Agent: git-oschina-hook
# true/false - true 不需要处理
X-Gitee-Ping: true
# Merge Request Hook
X-Gitee-Event: Push Hook
X-Git-Oschina-Event: Push Hook
# uuid
X-Request-ID: 00000000000000000000000000000000
X-Gitee-Timestamp: 1675844156127
# 配置的密码或签名 - 同 payload 里的 password
X-Gitee-Token:

# Gitea
# ==========================
X-Gitea-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
X-Gitea-Event: push
X-GitHub-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
X-GitHub-Event: push
X-Gogs-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
X-Gogs-Event: push
Authorization:

Payload

  • application/x-www-form-urlencoded
  • application/json

argo-events

{
"context": {
"type": "type_of_event_source",
"specversion": "cloud_events_version",
"source": "name_of_the_event_source",
"id": "unique_event_id",
"time": "event_time",
"datacontenttype": "type_of_data",
"subject": "name_of_the_configuration_within_event_source"
},
"data": {
"header": {
/* the headers from the request received by the event-source from the external entity */
},
"body": {
/* the payload of the request received by the event-source from the external entity */
}
}
}

Pathname

coding.net

212.129.144.0/24
212.64.105.0/24
49.234.127.0/24
49.235.224.0/24
49.234.65.0/24
81.69.101.0/24
codefor
ITERATION_CREATED创建迭代
ITERATION_DELETED删除迭代
ITERATION_UPDATED更新迭代
ITERATION_PLANNED规划迭代
ISSUE_CREATED创建事项
ISSUE_DELETED删除事项
ISSUE_STATUS_UPDATED状态变更
ISSUE_ASSIGNEE_CHANGED分配处理人
ISSUE_ITERATION_CHANGED规划迭代
ISSUE_RELATIONSHIP_CHANGED关联关系变更
ISSUE_UPDATED更新事项信息
ISSUE_COMMENT_CREATED增加评论
ISSUE_HOUR_RECORD_UPDATED更新工时信息
GIT_MR_CREATED合并请求创建
GIT_MR_UPDATED合并请求更新
GIT_MR_MERGED合并请求合并
GIT_MR_CLOSED合并请求关闭
GIT_MR_NOTE合并请求评论
GIT_PUSHED代码推送
CI_JOB_CREATED创建构建计划
CI_JOB_UPDATED修改构建计划
CI_JOB_DELETED删除构建计划
CI_JOB_STARTED启动构建计划
CI_JOB_FINISHED构建计划执行结束
ARTIFACTS_VERSION_CREATED推送制品
ARTIFACTS_VERSION_UPDATED更新制品
ARTIFACTS_VERSION_DOWNLOADED下载制品
ARTIFACTS_VERSION_DELETED删除制品
ARTIFACTS_VERSION_RELEASED发布制品
ARTIFACTS_VERSION_DOWNLOAD_FORBIDDEN禁止下载制品
ARTIFACTS_VERSION_DOWNLOAD_ALLOWED恢复下载制品
ARTIFACTS_VERSION_DOWNLOAD_BLOCKED下载制品阻断
ARTIFACTS_REPO_CREATED创建制品仓库
ARTIFACTS_REPO_UPDATED更新制品仓库配置
ARTIFACTS_REPO_DELETED删除制品仓库
WIKI_CREATED文档新建
WIKI_UPDATED文档更新
WIKI_MOVED文档移动
WIKI_SHARE_UPDATED文档更改分享状态
WIKI_ACCESS_UPDATED文档更改访问设置
WIKI_COPIED文档 / 文档树复制
WIKI_MOVED_TO_RECYCLE_BIN文档移动到回收站
WIKI_RESTORED_FROM_RECYCLE_BIN文档从回收站恢复
WIKI_DELETED文档彻底删除
FILE_CREATED文件新建
FILE_UPDATED文件更新
FILE_RENAMED文件重命名
FILE_SHARE_UPDATED文件更改分享状态
FILE_MOVED文件 / 文件夹移动
FILE_COPIED文件 / 文件夹复制
FILE_MOVED_TO_RECYCLE_BIN文件 / 文件夹移动到回收站
FILE_RESTORED_FROM_RECYCLE_BIN文件 / 文件夹从回收站恢复
FILE_DELETED文件 / 文件夹彻底删除
WIKI_DELETED添加项目成员
MEMBER_DELETED移除项目成员
MEMBER_ROLE_UPDATED更新项目成员用户组
headerfor
X-Coding-Service-Hook-Event事件标识
X-Coding-Service-Hook-IdService Hook 编号
X-Coding-Service-Hook-Action发送行为,如:wecom_group_chat_robot
X-Coding-Delivery发送送达编号

参考