mbox

[0/2] Mention users' relationship to packages in comment notifications

Message ID 20181016031844.30857-1-archlinux@thecybershadow.net
Headers show

Message

Vladimir Panteleev Oct. 16, 2018, 3:18 a.m. UTC
Generally, it's useful to distinguish actionable vs. non-actionable
notifications. When receiving a comment notification on a package a
user maintains, it can be easy to miss it in a flood of comment
notifications for packages the user merely follows. To this end, this
patch series adds code to mention the user's relationship to the
package when sending a comment notification email.

Comments:

 - I'm not too happy about how intrusive the changes in the first
   refactoring comment are. Using a Python dictionary instead of
   introducing a new class would have allowed to avoid declaring the
   new classes, but that's not where the bulk of changes is. Much of
   the diff is cluttered from rewrapping to fit within 80
   columns. Open to suggestions.

 - We could also do this for other notification types, but the comment
   notification is by far the most common one, so I've implemented
   this only for comment notifications for now. Should we decide
   otherwise, it is doable without introducing or updating
   translatable strings.

 - I'm not including .pot changes, as I've been told this is not being
   done simultaneously with changes that affect it; though, I've
   checked the diff after `make update-pot` and it looks okay to me.

Vladimir Panteleev (2):
  notify.py: Encapsulate individual message recipient into a new class
  notify.py: Mention users' relationship to packages in comment
    notifications

 aurweb/scripts/notify.py | 216 ++++++++++++++++++++++++++-------------
 test/t2500-notify.sh     | 150 +++++++++++++++++++++++++++
 2 files changed, 293 insertions(+), 73 deletions(-)