How GitTrek checks watched repositories
How one scheduled repository check can serve several watchlists and keep Discord notifications grouped.
Schedule by repository
A GitTrek watchlist pairs a repository with the issue labels a user wants to follow. On each scheduled pass, the scheduler groups active watches by repository and queues one BullMQ check per repository. Several watches can therefore share a single check.
Match each watchlist
The worker fetches issues for the repository and normalizes their labels to lowercase. It compares those labels with each user’s watchlist, so people can follow different categories on the same repository.
Deliver matches in batches
The worker groups the matching issues by user before queueing notifications. The notification service then groups issues by repository in the Discord message. This separates the repository check from delivery and keeps related matches together.