Webhooks
${settingsTabs}Payload 协议兼容 Gitea(X-Gitea-Signature HMAC-SHA256 hex),下游 Action 不用改。
事件: issues (opened/closed/reopened), issue_comment (created)。
// Webhook management page for a project: list existing webhooks, add new ones, // toggle active, delete, send test ping, view recent delivery history per hook. import { type WebhookRow, type WebhookDeliveryRow, } from "../webhooks"; import { type ProjectRow } from "../store"; import { THEME_CSS, escapeHtml, escapeAttr, tabNavHTML } from "../render/layout"; import { projectSettingsTabsHTML } from "./projectUpstreams"; function statusClass(status: number | null): string { if (status === null) return "err"; if (status >= 200 && status < 300) return "ok"; if (status >= 400 && status < 500) return "warn"; return "err"; } function deliveryRowHtml(d: WebhookDeliveryRow): string { const status = d.response_status === null ? "—" : String(d.response_status); const cls = statusClass(d.response_status); const err = d.error ? `
${escapeHtml(d.response_body)}${escapeHtml(d.payload)}${escapeHtml(wh.url)}| 时间 | 事件 | delivery | 状态 | 耗时 | 详情 |
|---|
这个项目还没有 webhook。
用下面的表单添加一个。
Payload 协议兼容 Gitea(X-Gitea-Signature HMAC-SHA256 hex),下游 Action 不用改。
事件: issues (opened/closed/reopened), issue_comment (created)。