Skip to content

Commit

Permalink
Add release notes body
Browse files Browse the repository at this point in the history
  • Loading branch information
thebentern committed Mar 7, 2024
1 parent 436bcfc commit dae9d5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface DeviceFirmwareResource {
title: string;
page_url?: string;
zip_url?: string;
release_notes?: string;
}

export const DeviceRequestOptions = {
Expand Down
7 changes: 4 additions & 3 deletions src/routes/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -14,10 +14,11 @@ export const GithubRoutes = () => {
title: release.name,
page_url: release.html_url,

Check warning on line 15 in src/routes/github.ts

View workflow job for this annotation

GitHub Actions / quality

This object property name should be in camelCase.
zip_url: release.assets.find((asset) =>

Check warning on line 16 in src/routes/github.ts

View workflow job for this annotation

GitHub Actions / quality

This object property name should be in camelCase.
asset.name.startsWith("firmware-"),
asset.name.startsWith("firmware-")
)?.browser_download_url,
release_notes: release.body,

Check warning on line 19 in src/routes/github.ts

View workflow job for this annotation

GitHub Actions / quality

This object property name should be in camelCase.
};
}),
})
);
});
};

0 comments on commit dae9d5a

Please sign in to comment.