diff --git a/docs/decisions.md b/docs/decisions.md index f162bda..4c17d3a 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -805,3 +805,74 @@ allowlist of it. looks like a WAF rule against `.env` leaks (for example CrowdSec's `vpatch-env-access`). Fix it there with an exception for this host, not by renaming routes in showcase. + +## Issues and comments + +The spec lists issues and comments as non-goals. Daniel asked for both, so +they're in, read-only like pulls. + +- **Issues tab** (`//issues/`), between Releases and Pulls: the 50 + newest issues (`/issues?state=all&type=issues`; the issues API has no sort + option). Gitea's issues API returns pulls too, so anything with + `pull_request` set is dropped. The heading counts open and closed issues; + labels are plain pills, since the CSP allows no inline colors. +- **Comments** on issues and pulls, oldest first, from + `/issues/{n}/comments`, fetched only when the item's `comments` count is + above zero. That endpoint only returns real comments, not timeline + events. Bodies come from anyone, so they go through the same Markdown + allowlist as READMEs; the fixture's comment carries a `\n\n[click](javascript:alert(1))", + "created_at": "2026-11-20T09:00:00Z", + "user": { "login": "Daniel" } + }, + { + "body": "That works, thanks!", + "created_at": "2026-11-20T10:30:00Z", + "user": { "login": "friend" } + } +] diff --git a/testdata/gitea/api/v1/repos/daniel/repo-a/pulls.json b/testdata/gitea/api/v1/repos/daniel/repo-a/pulls.json index 1741587..f87916a 100644 --- a/testdata/gitea/api/v1/repos/daniel/repo-a/pulls.json +++ b/testdata/gitea/api/v1/repos/daniel/repo-a/pulls.json @@ -1,6 +1,7 @@ [ { "number": 4, + "comments": 1, "title": "Add a /healthz endpoint", "body": "Adds a health check.\n\n- [x] handler\n- [ ] docs", "state": "open", diff --git a/testdata/golden/index.html b/testdata/golden/index.html index 5069ee1..08534a5 100644 --- a/testdata/golden/index.html +++ b/testdata/golden/index.html @@ -21,13 +21,13 @@ - - - + + + - +