Skip to content

fix: announce Christmas Eve, which OffDays lists but never returns - #25

Open
eastagiletracker wants to merge 1 commit into
hashrocket:masterfrom
eastagiletracker:agile-board/announce-christmas-eve
Open

eastagiletracker wants to merge 1 commit into
hashrocket:masterfrom
eastagiletracker:agile-board/announce-christmas-eve

Conversation

@eastagiletracker

Copy link
Copy Markdown

This PR proposes announcing Christmas Eve, which OffDays::HASHROCKET_HOLIDAYS lists but days_off never returns. We include this PR work along with a full history of your repo at https://eastagiletracker.com/projects/985. You can sign in with your GitHub ID to claim ownership of the project.

What was wrong

OffBot::OffDays::HASHROCKET_HOLIDAYS includes "Christmas Eve", and it has survived both prunings of that list (MLK/Presidents' Day in 2018, Good Friday in 2020). But the holidays gem defines no Christmas Eve for :us or :informal, and unlike New Year's Eve and Thanksgiving Friday it was never added to custom_holidays.yaml. So the name filter in days_off has nothing to match, and the Monday announcement silently skips it. Reproduced on current master (4ba013a) with Ruby 3.4.5:

$ bundle exec ruby -e 'require "./lib/offbot"; puts OffBot::MessageBuilder.build_message(message_start: "Happy Monday", from_date: Date.new(2025,12,22), to_date: Date.new(2026,1,5))'
Happy Monday:
Thursday, 25 Dec 2025: Christmas Day
Wednesday, 31 Dec 2025: New Year's Eve
Thursday, 01 Jan 2026: New Year's Day

The next miss would be the 21 Dec 2026 announcement, where Christmas Eve falls on a Thursday.

The change

  • custom_holidays.yaml: define Christmas Eve (Dec 24, us, :informal) next to New Year's Eve, plus a matching entry in the file's tests: block. No observed: rule, so it reports the calendar date the same way the gem-provided holidays in this list do.
  • lib/offbot/off_days.rb: mark the entry # in custom_holidays.yaml, like the other two custom ones.
  • spec/offbot/off_days_spec.rb: the existing 2017 expectation now includes Sunday 24 Dec 2017, and a new example checks the week of 21 Dec 2026 returns Christmas Eve and Christmas Day.

After the change the same command prints Wednesday, 24 Dec 2025: Christmas Eve ahead of Christmas Day. bundle exec rspec spec was 3 examples, 0 failures before; with the new spec and without the YAML change it is 4 examples, 2 failures (both Christmas Eve expectations); with the change it is 4 examples, 0 failures (run several times, since the suite uses random order).

If Christmas Eve is no longer a Hashrocket day off, the other fix is to drop it from HASHROCKET_HOLIDAYS. Right now the list and the announcements disagree, and this PR goes with the list.

How this was managed

We imported this repo's 24 pull requests into a board at https://eastagiletracker.com/projects/985 and tracked this fix there as https://eastagiletracker.com/projects/985/stories/1123760.

board

If you'd rather not receive contributions like this, reply no-more-prs on this pull request and we won't open any further ones on your repositories.


Lawrence W. Sinclair
CEO / East Agile
linkedin.com/in/lwsinclair/
eastagile.com

Christmas Eve is in HASHROCKET_HOLIDAYS, but the holidays gem does not
define it for :us or :informal, so days_off never returned it and the
Monday announcement skipped it. Define it in custom_holidays.yaml next to
New Year's Eve and Thanksgiving Friday.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant