Add monthly scheduling with set week [1st|2nd|3rd|4th|last]#92
Merged
Conversation
5f4b43e to
7b32729
Compare
Adds `set week [1st|2nd|3rd|4th|last]` to S'Up on the nth weekday of every month (e.g. 2nd Monday). Use `unset week` to revert to the weekly schedule. When monthly mode is active, `sup_every_n_weeks` is ignored. - Channel model: `sup_week_of_month` field (nil=weekly, 1–5), `WEEK_OF_MONTH_ORDINALS` lookup table, `monthly_sup_date` helper (handles "last" via end-of-month math), monthly-aware `sup?` and `next_sup_at`, display helpers `sup_week_of_month_s` and `sup_schedule_s` - Commands: `set_week_of_month`, `unset_week_of_month`, wired into `channel_set`/`channel_unset`, `channel_info` uses `sup_schedule_s` - API presenter: exposes `sup_week_of_month` and `sup_week_of_month_s` - Help, changelog, and specs updated Closes #40 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7b32729 to
fc1e1c3
Compare
Closed
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.
Adds
set week [1st|2nd|3rd|4th|last]to S'Up on the nth weekday of every month. Useunset weekto revert to the weekly schedule. When monthly mode is active,sup_every_n_weeksis ignored.Usage
Changes
lib/models/channel.rb:sup_week_of_monthfield (nil=weekly, 1–5),WEEK_OF_MONTH_ORDINALSlookup table,monthly_sup_datehelper (handles "last" via end-of-month math), monthly-awaresup?andnext_sup_at, display helperssup_week_of_month_sandsup_schedule_slib/commands/set.rb:set_week_of_month,unset_week_of_month, wired intochannel_set/channel_unset,channel_infonow usessup_schedule_sfor both weekly and monthly modeslib/api/presenters/channel_presenter.rb: exposessup_week_of_monthandsup_week_of_month_slib/commands/help.rb: documentedset weekandunset weekspec/models/channel_spec.rb: monthlysup?andnext_sup_attests including "last" weekdayspec/slack-sup/commands/set_spec_channel.rb: view/change/cannot-change tests forweekCHANGELOG.md: new entry