diff options
| author | Joe Mou <dev@mou.fo> | 2026-01-28 22:41:00 -0500 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-01-28 23:03:09 -0500 |
| commit | 94fcda59a064b5e8952d1bccb6b9a153c39acda1 (patch) | |
| tree | 849ac2b7f33f62f774d145856eaee5267e3593ae /cgithub/src/index.ts | |
| parent | 631bc70d94cd12d0432cca1a220a3642eea6976a (diff) | |
Commits list
Diffstat (limited to 'cgithub/src/index.ts')
| -rw-r--r-- | cgithub/src/index.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cgithub/src/index.ts b/cgithub/src/index.ts index d4229fd..4486dff 100644 --- a/cgithub/src/index.ts +++ b/cgithub/src/index.ts @@ -7,6 +7,7 @@ import path from "node:path"; import url from "node:url"; import { getGitHubBlob, + getGitHubCommits, getGitHubIssues, getGitHubRepo, getGitHubTree, @@ -67,6 +68,11 @@ app.get("/:owner/:repo/issues", async (c) => { return tryRender(c, "issues.eta", getGitHubIssues(owner, repo)); }); +app.get("/:owner/:repo/commits/:branch/:path{.*}?", async (c) => { + const { owner, repo, branch, path = "" } = c.req.param(); + return tryRender(c, "commits.eta", getGitHubCommits(owner, repo, branch, path)); +}); + app.all("*", async (c) => { const path = c.req.path; c.header("Referrer-Policy", "no-referrer"); |
