OI
owner-bugs

API Reference

All Cloudflare Pages Function endpoints for the Owner Bugs application.

Bug Report

POST
/api/report

Submit a bug report — creates a GitHub Issue with screenshots and sends confirmation email

Request (FormData)

FieldTypeRequiredDescription
projectstringRequiredGitHub repo name from allowed list
prioritystringOptional"low", "medium", "high", or "critical" (default: "medium")
titlestringRequiredBug title (max 200 chars)
descriptionstringRequiredBug description (max 5,000 chars)
reportedBystringRequiredReporter name (max 100 chars)
emailstringRequiredReporter email for notifications
screenshotsFile[]OptionalMax 5 images, PNG/JPEG/GIF/WebP, 5MB each

Success Response (200)

{ "url": "https://github.com/ownerinspections/...", "number": 42 }

Webhook

POST
/api/webhook

GitHub webhook handler for issue close and comment events

Verified via HMAC-SHA256 signature (WEBHOOK_SECRET). On issue close with "bug" label: sends resolved email. On new comment: sends comment notification email.

Issue Management

GET
/api/issues

List bug issues with filtering and pagination

GET
/api/search

Search open bug issues by query string

GET
/api/reopen

Reopen a closed issue via a token link (from resolved email)

Security

CORS Same-origin requests only.

XSS All text inputs sanitised — <> characters rejected.

Files Only PNG, JPEG, GIF, WebP. Max 5MB per file, 5 files total.

Webhook HMAC-SHA256 signature verification on all GitHub webhook events.