From dae9d5ad43677049061cfea694e5bfeb199f1c7c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 6 Mar 2024 20:32:41 -0600 Subject: [PATCH] Add release notes body --- src/lib/github.ts | 1 + src/routes/github.ts | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/github.ts b/src/lib/github.ts index b40df0c..2f3fc43 100644 --- a/src/lib/github.ts +++ b/src/lib/github.ts @@ -26,6 +26,7 @@ export interface DeviceFirmwareResource { title: string; page_url?: string; zip_url?: string; + release_notes?: string; } export const DeviceRequestOptions = { diff --git a/src/routes/github.ts b/src/routes/github.ts index adfd209..1d892ec 100644 --- a/src/routes/github.ts +++ b/src/routes/github.ts @@ -4,7 +4,7 @@ import { GitHub } from "../lib/index.js"; export const GithubRoutes = () => { return app.get("/github/releases", async (_, res) => { const releases = await GitHub.deviceOctokit.rest.repos.listReleases( - GitHub.DeviceRequestOptions, + GitHub.DeviceRequestOptions ); res.send( @@ -14,10 +14,11 @@ export const GithubRoutes = () => { title: release.name, page_url: release.html_url, zip_url: release.assets.find((asset) => - asset.name.startsWith("firmware-"), + asset.name.startsWith("firmware-") )?.browser_download_url, + release_notes: release.body, }; - }), + }) ); }); };