Document Gitea webhook setup and fix log file sidebar sorting
Some checks failed
CI / test (pull_request) Has been cancelled
Some checks failed
CI / test (pull_request) Has been cancelled
- Add setup instructions for system-wide and org/repo webhooks - Fix sidebar to sort log file groups by most recent file timestamp - Maintains chronological order when viewing logs across different git commits Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1f386df256
commit
bafb6fe93b
|
|
@ -10,7 +10,15 @@ Discord-Gitea bridge bot. When someone opens a PR or leaves a comment on [git.no
|
|||
4. `bun run subdomain:dev` to start the server.
|
||||
5. Visit `localhost:3000/discord/auth` to authorize the bot to your Discord server.
|
||||
6. Use [Tailscale Funnel](https://tailscale.com/kb/1223/funnel) or ngrok to expose your local server to the internet.
|
||||
7. Add a Gitea webhook at `https://git.nose.space/<org>/settings/hooks` pointing to `https://<your-tunnel>/gitea/webhook`.
|
||||
7. Add a Gitea webhook (see below).
|
||||
|
||||
### Gitea webhook
|
||||
|
||||
Spike needs a webhook so Gitea sends PR and comment events to it. You have two options:
|
||||
|
||||
**System webhook (covers all repos)** — Requires Gitea admin access. Go to **Site Administration > System Webhooks > Add Webhook > Gitea**. Set the target URL to `https://spike.theworkshop.cc/gitea/webhook`. Under "Trigger On", select **Custom Events** and enable Pull Request, Issue Comment, and Pull Request Comment. This fires for every repo on the instance.
|
||||
|
||||
**Org/repo webhook (covers one org or repo)** — Go to the org or repo settings, then **Webhooks > Add Webhook > Gitea**. Same target URL and event configuration as above. Only fires for that org or repo.
|
||||
|
||||
### Environment variables
|
||||
|
||||
|
|
|
|||
|
|
@ -47,20 +47,23 @@ function EventRow({ event }: { event: StoredLogEvent }) {
|
|||
}
|
||||
|
||||
function Sidebar({ files, selectedFile }: { files: string[]; selectedFile?: string }) {
|
||||
// Group files by sha
|
||||
// Group files by sha, sorted by most recent file in each group
|
||||
const grouped: Record<string, string[]> = {}
|
||||
for (const file of files) {
|
||||
const sha = file.split("_")[0] || "unknown"
|
||||
const list = grouped[sha] || (grouped[sha] = [])
|
||||
list.push(file)
|
||||
}
|
||||
const sortedGroups = Object.entries(grouped).sort(([, a], [, b]) => {
|
||||
return b[0]!.localeCompare(a[0]!)
|
||||
})
|
||||
|
||||
return (
|
||||
<nav style="width: 280px; min-width: 280px; background: #141414; border-right: 1px solid #2a2a2a; overflow-y: auto; padding: 16px 0">
|
||||
<div style="padding: 0 16px 12px; color: #9ca3af; font-size: 11px; text-transform: uppercase; letter-spacing: 1px">
|
||||
Log Files
|
||||
</div>
|
||||
{Object.entries(grouped).map(([sha, shaFiles]) => (
|
||||
{sortedGroups.map(([sha, shaFiles]) => (
|
||||
<div style="margin-bottom: 8px">
|
||||
<div style="padding: 4px 16px; color: #6b7280; font-size: 11px; font-family: monospace">{sha}</div>
|
||||
{shaFiles.map((file) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user