Add Python script checking and notify non-emailable users

Authored by JeanFred on Aug 27 2019, 9:13 PM.


Add Python script checking and notify non-emailable users

A condition to win anything at WLM is that people have
an email address set in their preferences.

It happens often that they do not, and that causes
problems down the line. When that is caught weeks later,
it is too late as people are likely not checking the wiki.

This adds a new bot to do that.

It takes as input a category and a timedelta (in minutes).

  • Via the database, get all users who have uploaded a picture to that category in the last timedelta.
  • Check whether each user is emailable (via the API)
  • If not, send a message on its talk page... ...unless the bot has already posted something on that talk page

The plan is to cron the bot execution every N minutes
with a timedelate of M, with M > N.
(For example, every 30 minutes, for a timedelta of 45 minutes)

Also add some unit tests for it.

Bug: T195341
Change-Id: If46d50978fb5bac72f5fc556d81881e006f606cc