From 2582a311aa4f70ea98a04a27ea50e1879807f8a5 Mon Sep 17 00:00:00 2001
From: Manuel <30572287+manuel-rw@users.noreply.github.com>
Date: Sat, 14 Dec 2024 17:50:02 +0100
Subject: [PATCH] feat: pr feedback
---
apps/nextjs/src/components/user-avatar-menu.tsx | 2 +-
packages/cron-jobs/package.json | 1 -
packages/request-handler/package.json | 1 +
packages/request-handler/src/update-checker.ts | 6 +++---
pnpm-lock.yaml | 6 +++---
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/apps/nextjs/src/components/user-avatar-menu.tsx b/apps/nextjs/src/components/user-avatar-menu.tsx
index 2c4251b6f..173d95ff3 100644
--- a/apps/nextjs/src/components/user-avatar-menu.tsx
+++ b/apps/nextjs/src/components/user-avatar-menu.tsx
@@ -77,7 +77,7 @@ export const UserAvatarMenu = ({ children, availableUpdates }: UserAvatarMenuPro
leftSection={}
>
- {t("updateAvailable", { countUpdates: availableUpdates.length, tag: availableUpdates[0].tag_name })}
+ {t("updateAvailable", { countUpdates: availableUpdates.length, tag: availableUpdates[0].tagName })}
diff --git a/packages/cron-jobs/package.json b/packages/cron-jobs/package.json
index d7fe53504..934fdd238 100644
--- a/packages/cron-jobs/package.json
+++ b/packages/cron-jobs/package.json
@@ -39,7 +39,6 @@
"@homarr/server-settings": "workspace:^0.1.0",
"@homarr/translation": "workspace:^0.1.0",
"@homarr/validation": "workspace:^0.1.0",
- "octokit": "^4.0.2",
"semver-parser": "^4.1.7"
},
"devDependencies": {
diff --git a/packages/request-handler/package.json b/packages/request-handler/package.json
index 0d9a95680..2809cfb0c 100644
--- a/packages/request-handler/package.json
+++ b/packages/request-handler/package.json
@@ -29,6 +29,7 @@
"@homarr/log": "workspace:^0.1.0",
"@homarr/redis": "workspace:^0.1.0",
"dayjs": "^1.11.13",
+ "octokit": "^4.0.2",
"pretty-print-error": "^1.1.2",
"superjson": "2.2.2"
},
diff --git a/packages/request-handler/src/update-checker.ts b/packages/request-handler/src/update-checker.ts
index b21982fae..a67eac911 100644
--- a/packages/request-handler/src/update-checker.ts
+++ b/packages/request-handler/src/update-checker.ts
@@ -9,7 +9,7 @@ import { createCachedRequestHandler } from "@homarr/request-handler/lib/cached-r
import packageJson from "../../../package.json";
export const updateCheckerRequestHandler = createCachedRequestHandler({
- queryKey: "",
+ queryKey: "homarr-update-checker",
cacheDuration: dayjs.duration(1, "hour"),
async requestAsync(_) {
const octokit = new Octokit();
@@ -47,13 +47,13 @@ export const updateCheckerRequestHandler = createCachedRequestHandler({
name: release.name,
contentHtml: release.body_html,
url: release.html_url,
- tag_name: release.tag_name,
+ tagName: release.tag_name,
})),
};
},
createRedisChannel() {
return createChannelWithLatestAndEvents<{
- availableUpdates: { name: string | null; contentHtml?: string; url: string; tag_name: string }[];
+ availableUpdates: { name: string | null; contentHtml?: string; url: string; tagName: string }[];
}>("homarr:update");
},
});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3aeac4814..56900a7a1 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -797,9 +797,6 @@ importers:
'@homarr/validation':
specifier: workspace:^0.1.0
version: link:../validation
- octokit:
- specifier: ^4.0.2
- version: 4.0.2
semver-parser:
specifier: ^4.1.7
version: 4.1.7
@@ -1352,6 +1349,9 @@ importers:
dayjs:
specifier: ^1.11.13
version: 1.11.13
+ octokit:
+ specifier: ^4.0.2
+ version: 4.0.2
pretty-print-error:
specifier: ^1.1.2
version: 1.1.2(patch_hash=4arrfgbz7em6s4gqywse7esg4u)