Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release notes body #21

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@ -12,12 +12,13 @@
return <GitHub.DeviceFirmwareResource>{
id: release.tag_name,
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.
};
}),
})
);
});
};
Loading