From 499bba129c842c00c1a28d85bc044ab609aee44e Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Mon, 21 Sep 2026 17:55:06 -0400 Subject: Add discussions Discussions are served from GitHub's older server-rendered HTML, with no embeddedData JSON to read, so the scraper walks the DOM the way the pull request and wiki code does. A discussion's timeline opens with its own post and continues with its comments, each carrying its replies nested inside it, which is where the recursion in _discussionComment.eta comes from. Categories, upvotes, and the answer a Q&A discussion is marked with all come along. Only what GitHub renders up front is shown: neither the next page of discussions nor the replies it hides behind a "Show N previous replies" button are fetched, so a comment says how many replies it is missing. Co-Authored-By: Claude Opus 5 --- CLAUDE.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CLAUDE.md') diff --git a/CLAUDE.md b/CLAUDE.md index ef7b133..cc10163 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -34,6 +34,9 @@ pnpm test - `GET /:owner/:repo/tree/:branch/:path*` - Directory listing - `GET /:owner/:repo/blob/:branch/:path` - File content view - `GET /:owner/:repo/commits/:branch/:path*` - Commit history of the repository, a directory, or a file +- `GET /:owner/:repo/discussions` - Discussion list, searched with `discussions_q` +- `GET /:owner/:repo/discussions/categories/:category` - Discussions in one category +- `GET /:owner/:repo/discussions/:number` - A discussion, its comments, and their replies - `GET /:owner/:repo/wiki` - Wiki home page - `GET /:owner/:repo/wiki/:page` - Wiki page (also `/:page/:oid` for a revision) - `GET /:owner/:repo/wiki/_pages` - Wiki page index -- cgit v1.3.1