diff options
| author | Joe Mou <dev@mou.fo> | 2026-02-11 01:56:37 -0500 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-02-11 01:56:49 -0500 |
| commit | 934b2c39537d6718375170a029fc1d1df01024c5 (patch) | |
| tree | 0e105a684b16554a19d1ba40b7e977e0c18a94b8 /src/index.ts | |
| parent | b75d4cfb610b8792e6f1236b613f554d1ac5b78d (diff) | |
Add GitHub releases support
Scrapes releases page HTML to display version tags, publish dates, and changelog content.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts index 4486dff..2f8efef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,6 +9,7 @@ import { getGitHubBlob, getGitHubCommits, getGitHubIssues, + getGitHubReleases, getGitHubRepo, getGitHubTree, GitHubHTTPError, @@ -73,6 +74,11 @@ app.get("/:owner/:repo/commits/:branch/:path{.*}?", async (c) => { return tryRender(c, "commits.eta", getGitHubCommits(owner, repo, branch, path)); }); +app.get("/:owner/:repo/releases", async (c) => { + const { owner, repo } = c.req.param(); + return tryRender(c, "releases.eta", getGitHubReleases(owner, repo)); +}); + app.all("*", async (c) => { const path = c.req.path; c.header("Referrer-Policy", "no-referrer"); |
