diff options
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 d4229fd..4486dff 100644 --- a/src/index.ts +++ b/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"); |
