Repository navigation
fix: announce Christmas Eve, which OffDays lists but never returns - #25
Open
eastagiletracker wants to merge 1 commit into
Open
eastagiletracker wants to merge 1 commit into
eastagiletracker wants to merge 1 commit into
Conversation
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.
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.
This PR proposes announcing Christmas Eve, which
OffDays::HASHROCKET_HOLIDAYSlists butdays_offnever 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_HOLIDAYSincludes"Christmas Eve", and it has survived both prunings of that list (MLK/Presidents' Day in 2018, Good Friday in 2020). But theholidaysgem defines no Christmas Eve for:usor:informal, and unlike New Year's Eve and Thanksgiving Friday it was never added tocustom_holidays.yaml. So the name filter indays_offhas nothing to match, and the Monday announcement silently skips it. Reproduced on currentmaster(4ba013a) with Ruby 3.4.5: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'stests:block. Noobserved: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 Eveahead of Christmas Day.bundle exec rspec specwas 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.
If you'd rather not receive contributions like this, reply
no-more-prson 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