GitHub Webhook回调
接收 GitHub Push/Pull Request 事件,自动提取变更 SQL 并触发审核。
GitHub 配置方式:
- 在 PawSQL 管理后台创建 SCM 监控配置,获取 webhook token
- 在 GitHub 项目 → Settings → Webhooks 中填写 URL:
{PAWSQL_SERVER}/api/v1/integrations/scm/webhook/{token} - Content type 选
application/json - 勾选 Push events 和 Pull request events
期望的 HTTP Header:
X-GitHub-Event: 事件类型(push / pull_request)
请求 Body:GitHub Webhook Payload(JSON 格式),参考 GitHub Webhook 文档
POST
Error
路径参数
Webhook 验证 token
请求体
application/json
GitHub Webhook Payload,格式参考 GitHub 官方文档
响应
200 - text/plain
Webhook 处理结果
The response is of type string.