Skip to content

Conversation

@ToastedDev
Copy link
Contributor

closes #44

@ToastedDev ToastedDev requested a review from GalvinPython as a code owner June 23, 2025 10:19
@GalvinPython GalvinPython added enhancement New feature or request component: bot labels Jun 23, 2025
@GalvinPython GalvinPython added this to the 2.0.0 milestone Jun 23, 2025
@GalvinPython GalvinPython moved this to In review in Feedr Jun 23, 2025
@GalvinPython GalvinPython requested a review from Copilot June 23, 2025 10:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the update notification functionality by splitting the upload fetching and sending logic into separate functions.

  • Moved message sending logic to a dedicated sendLatestUploads function
  • Introduced a shared updates map in fetchLatestUploads to store update details
  • Updated the ready event to schedule both fetching and sending on intervals

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/utils/youtube/sendLatestUploads.ts New function that iterates over updates and sends messages
src/utils/youtube/fetchLatestUploads.ts Exports an updates map and populates it with upload details
src/events/ready.ts Configures periodic calls for both fetching and sending updates
Comments suppressed due to low confidence (1)

src/events/ready.ts:20

  • Consider awaiting fetchLatestUploads or ensuring it completes before sendLatestUploads is invoked to prevent a potential race condition in update propagation.
    fetchLatestUploads();

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@GalvinPython GalvinPython merged commit 411c998 into GalvinPython:dev Jun 23, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in Feedr Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: bot enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Refactoring: Split the update function into two updating and sending messages functions

2 participants