feat: add webhook event history UI page
All checks were successful
Check / check (pull_request) Successful in 5s

Add a per-app webhook event history page at /apps/{id}/webhooks that
displays received webhook events with their match/no-match status,
event type, branch, commit SHA (linked to commit URL when available),
and timestamp.

Changes:
- Add webhook_events.html template following existing UI patterns
- Add HandleAppWebhookEvents handler in webhook_events.go
- Register GET /apps/{id}/webhooks route
- Register webhook_events.html in template cache
- Add ShortCommit() method to WebhookEvent model
- Add 'Event History' link to app detail Webhook URL section
This commit is contained in:
clawbot
2026-03-10 04:19:18 -07:00
parent 49ff625ac4
commit e3bd3202bb
6 changed files with 155 additions and 1 deletions

View File

@@ -77,7 +77,10 @@
<!-- Webhook URL -->
<div class="card p-6 mb-6">
<h2 class="section-title mb-4">Webhook URL</h2>
<div class="flex items-center justify-between mb-4">
<h2 class="section-title">Webhook URL</h2>
<a href="/apps/{{.App.ID}}/webhooks" class="text-primary-600 hover:text-primary-800 text-sm">Event History</a>
</div>
<p class="text-sm text-gray-500 mb-3">Add this URL as a push webhook in your Gitea repository:</p>
<div class="copy-field" x-data="copyButton('webhook-url')">
<code id="webhook-url" class="copy-field-value text-xs">{{.WebhookURL}}</code>