summaryrefslogtreecommitdiff
path: root/cgithub/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cgithub/src/index.ts')
-rw-r--r--cgithub/src/index.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/cgithub/src/index.ts b/cgithub/src/index.ts
index 2f8efef..59c98ee 100644
--- a/cgithub/src/index.ts
+++ b/cgithub/src/index.ts
@@ -9,6 +9,7 @@ import {
getGitHubBlob,
getGitHubCommits,
getGitHubIssues,
+ getGitHubRelease,
getGitHubReleases,
getGitHubRepo,
getGitHubTree,
@@ -74,6 +75,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/tag/:tag", async (c) => {
+ const { owner, repo, tag } = c.req.param();
+ return tryRender(c, "release.eta", getGitHubRelease(owner, repo, tag));
+});
+
app.get("/:owner/:repo/releases", async (c) => {
const { owner, repo } = c.req.param();
return tryRender(c, "releases.eta", getGitHubReleases(owner, repo));