Rewrite goals ping job - #2469
Conversation
|
Actually, there's probably a more intuitive way to deal with scheduling. I'll try that tomorrow |
|
I like using labels to set the notification frequency 👍 That's a good idea. |
|
I removed the binary and zulip command because it doesn't make sense to run them outside of the job cadence (at least for now). |
|
Found out that the current pings are being triggered by @tomassedovic's scheduled messages invoking the zulip command. |
|
|
||
| // Find the time of the last comment posted. | ||
| let days_since_last_comment = (Utc::now() - issue.updated_at).num_days(); | ||
| fn multiple_owner_warnings(problems: &[OwnershipProblem<'_>]) -> String { |
There was a problem hiding this comment.
Drive-by: there seems to be a mix of logic, messages, utils in this file. would it be possible to separate such "area" in submodules? I'm thinking of project_goals/messages.rs and project_goals/utils.rs (with Period and maybe Schedule).
Period and Schedule also seems like good candidate for unit-tests.
There was a problem hiding this comment.
This is a bit.. involved :) But I guess it's better to see errors on Zulip than have to go through triagebot logs. Left some comments, but in general it makes sense to me.
Regarding the split, I don't mind keeping everything in one file for now, at least it is easier to access and search stuff. But if we do split it, I would split it by functionality, so essentially the code for the job vs code for handle would be separately, plus maybe a separate file for the shared data structures or fnctions.
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Run the job every week, allow goals to be on custom reporting schedules (weekly, biweekly, 4-weekly deadlines), DM owners with an aggregate of all their goals that need updates (instead of sending to goal topics), and report any errors to a dedicated topic.
Solves part of #2454
Examples
Direct message
Report (topic)
Goal accepted