From 5107adb1c7f55e71e33cb31f87cd96aa1f8bfb2b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 08:43:35 +0000 Subject: [PATCH 1/4] Initial plan From a28ad79108e34ff982529999a1bde0766d33f2fe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 08:46:28 +0000 Subject: [PATCH 2/4] feat: add standalone YouTube database update script Agent-Logs-Url: https://github.com/GalvinPython/feedr/sessions/fe3d0359-7e36-46f1-b3d4-8cbec9d51594 Co-authored-by: GalvinPython <77013913+GalvinPython@users.noreply.github.com> --- package.json | 1 + src/updateYouTube.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/updateYouTube.ts diff --git a/package.json b/package.json index 062f360..f503ba5 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "web:build": "cd web && bun build", "start:api": "echo 'Cannot start API without cargo. Reserved for future use' && exit 1", "start:bot": "bun run src/bot.ts", + "update:youtube": "bun src/updateYouTube.ts", "start:web": "cd web && bun start" }, "dependencies": { diff --git a/src/updateYouTube.ts b/src/updateYouTube.ts new file mode 100644 index 0000000..fcb295b --- /dev/null +++ b/src/updateYouTube.ts @@ -0,0 +1,14 @@ +import { env } from "./config.ts"; +import fetchLatestUploads from "./utils/youtube/fetchLatestUploads.ts"; + +if (!env.youtubeApiKey || env.youtubeApiKey === "YOUR_YOUTUBE_API_KEY") { + throw new Error("You MUST provide a YouTube API key in .env!"); +} + +console.log("Starting standalone YouTube database update..."); + +await fetchLatestUploads(); + +console.log("YouTube database update complete."); + +process.exit(0); From df097ed9537791df8dc75e64eba856f14b59e4ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 09:54:30 +0000 Subject: [PATCH 3/4] fix: move update:youtube script outside start:* group in package.json Agent-Logs-Url: https://github.com/GalvinPython/feedr/sessions/22378fe2-db26-4250-9439-e39e48067bbc Co-authored-by: GalvinPython <77013913+GalvinPython@users.noreply.github.com> --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f503ba5..c8bc57f 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ "web:build": "cd web && bun build", "start:api": "echo 'Cannot start API without cargo. Reserved for future use' && exit 1", "start:bot": "bun run src/bot.ts", - "update:youtube": "bun src/updateYouTube.ts", - "start:web": "cd web && bun start" + "start:web": "cd web && bun start", + "update:youtube": "bun src/updateYouTube.ts" }, "dependencies": { "cron": "^4.3.0", From 42574d5d8342a1f19d1f954634c1efdee67d2c53 Mon Sep 17 00:00:00 2001 From: Galvin Date: Tue, 12 May 2026 12:08:56 +0100 Subject: [PATCH 4/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/updateYouTube.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/updateYouTube.ts b/src/updateYouTube.ts index fcb295b..34f8362 100644 --- a/src/updateYouTube.ts +++ b/src/updateYouTube.ts @@ -7,8 +7,12 @@ if (!env.youtubeApiKey || env.youtubeApiKey === "YOUR_YOUTUBE_API_KEY") { console.log("Starting standalone YouTube database update..."); -await fetchLatestUploads(); +const updateSucceeded = await fetchLatestUploads(); -console.log("YouTube database update complete."); +if (updateSucceeded === true) { + console.log("YouTube database update complete."); + process.exit(0); +} -process.exit(0); +console.error("YouTube database update failed."); +process.exit(1);