Fix on-call timezone bug, channel resolution, and weekend DM skip#3
Merged
Fix on-call timezone bug, channel resolution, and weekend DM skip#3
Conversation
…weekend DMs - Use user's local date (not UTC) for daily reminder week-range check, fixing incorrect DMs for users in far-ahead timezones (e.g. NZ UTC+12) - Resolve #core channel ID by name via conversations.list (cached for process lifetime) instead of hardcoding channel name, fixing channel_not_found errors on private channels - Skip daily on-call reminder DMs on Saturday and Sunday - Add ONCALL_CHANNEL config (defaults to 'core') for channel name lookup - 8 new tests: NZ timezone regression, weekend skip, channel resolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#corechannel is now resolved by name viaconversations.list(cached for process lifetime) instead of passing the channel name string directly tochat_postMessage. Fixeschannel_not_founderrors on private channels. Channel name is configurable viaONCALL_CHANNELenv var (defaults tocore).Changes
src/nf_core_bot/scheduler/oncall_jobs.py_get_user_local_datetime()from_is_user_local_morning(). Added_resolve_channel_id()with process-lifetime cache. Daily reminder block uses user-local date for week check + weekday filter.src/nf_core_bot/config.pyONCALL_CHANNELdefault (core)tests/test_oncall_scheduler.pyVerified
CloudWatch evidence
The
channel_not_founderror was confirmed in yesterday's logs (2026-03-23 08:00:54 UTC):