-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
record upkeep year and use it for filtering checklist #2070
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My first / early reaction is that it feels like we have various year
arguments lying around, some of which refer to the year of the upkeep and others which refer to the year of the previous upkeep. To be clear, this is not a situation of your creation -- it largely pre-existed.
Do you agree? Do you think this is a good occasion to make that situation less confusing?
Left a couple other comments.
Yeah, I was a bit perplexed about the duality of I kinda don't think an argument for "current year" is needed at all - I can't imagine a situation where it would be anything other than what can be extracted from |
I have changed the code to record the full date rather than just the year. It still holds that we currently have nothing to use the added granularity for, but it is now recorded for the future. As for the |
I'm happy to deprecate the |
@jennybc I think this is ready now. If we merge it in we can ask people to call |
Thanks! |
Fix #1916
This PR adds two new functions:
record_upkeep_year()
which writes the year of the upkeep toConfig/usethis/upkeep
andlast_upkeep_year()
which retrieves this value or defaults to 2000 if it doesn't exist. These two functions are used inuse_tidy_upkeep_issue()
to automatically use the year of the last upkeep for filtering the produced checklist as well as incrementing the recorded year to the current year.Further, this PR fixes what appears to be a bug/discrepancy in how
year
was used inmake_upkeep_issue()
depending on whetheruse_upkeep_issue()
oruse_tidy_upkeep_issue()
was called