@editors can now easily change status of one or more questions to "Marked for deletion" or "Duplicate" by posting GDoc links to those questions
s, del <gdoc-link(s)> # changes to "Marked for deletion"
s, dup <gdoc-link(s)> # changes to "Duplicate"
When a @reviewer accepts a request for feedback on edited questions by replying to a message with "lgtm", "approved", or "accepted", Stampy changes their statuses to "Live on site". For that, he uses a cache that maps a Discord message ID to coda IDs of questions the GDocs of which are posted linked in that message. The problem is that this cache is lost whenever Stampy reboots (e.g. after any PR merge), so accepting a review request from before the last reboot doesn't work. This PR fixes that. Now, when Stampy sees an approval of a review request, that is missing from his cache, he goes over the last 2000 messages in that channels history, finds review requests, parses them and stores the message-id-to-question-ids in the cache.
Previously I used dataclasses for managing different kinds of commands. While it's handy, dataclasses introduce a lot of functionality that we don't really need, so I replaced them with TypedDicts, which are mostly typechecker sugar.
@editor
s can now easily change status of one or more questions to "Marked for deletion" or "Duplicate" by posting GDoc links to those questionsWhen a
@reviewer
accepts a request for feedback on edited questions by replying to a message with "lgtm", "approved", or "accepted", Stampy changes their statuses to "Live on site". For that, he uses a cache that maps a Discord message ID to coda IDs of questions the GDocs of which are posted linked in that message. The problem is that this cache is lost whenever Stampy reboots (e.g. after any PR merge), so accepting a review request from before the last reboot doesn't work. This PR fixes that. Now, when Stampy sees an approval of a review request, that is missing from his cache, he goes over the last 2000 messages in that channels history, finds review requests, parses them and stores the message-id-to-question-ids in the cache.Previously I used dataclasses for managing different kinds of commands. While it's handy, dataclasses introduce a lot of functionality that we don't really need, so I replaced them with TypedDicts, which are mostly typechecker sugar.