Commit graph

20 commits

Author SHA1 Message Date
Lukas Fleischer
60cdad28ee Distinguish auto-accepted requests
Before commit 9746a65 (Port notification routines to Python,
2015-06-27), notification emails for automatically closed requests
explicitly stated that the action was taken "automatically by the Arch
User Repository package request system". When porting the notification
routines to Python, this feature was overlooked and emails sent by the
new script always reported that the requester triggered the acceptance
or rejection of a request.

This patch reimplements the old behavior such that notifications no
longer look as if the requester had accepted the request himself.

Reported-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-06-30 22:45:26 +02:00
Lukas Fleischer
6ec4a3589e Send notifications when changing ownership
Add a new option that makes it possible to subscribe to package
ownership changes (adoption/disownment).

Fixes FS#15412.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-21 20:01:13 +01:00
Lukas Fleischer
1626d4d2f7 notify: Fix notification of request initiator
Reimplement get_request_recipients() such that it always returns the
email addresses of the package base maintainer and the request
initiator, instead of the email address of the user triggering the
request status change.

Fixes FS#48238.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-19 18:18:48 +01:00
Lukas Fleischer
443ccfab61 notify: Reintroduce Message-ID again
In commit 7b57e0e (Set Message-ID when sending package request emails,
2014-07-01), we changed the code responsible for sending notifications
such that the value of the Message-ID header is set deterministically in
the first email referring to a request. Unfortunately, this was
forgotten when porting the notification routines to Python in 9746a65
(Port notification routines to Python, 2015-06-27) and later fixed by
092e00f (notify: Fix references in request notifications, 2015-10-10).
However, when fixing another bug, the old behavior of not setting a
Message-ID was restored by d87b138 (notify: Fix merging of header dicts,
2015-10-26). Revert that particular change once more and add a comment
such that the line gets extra attention, should it be changed in the
future.

Fixes FS#48239.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-19 18:18:48 +01:00
Lukas Fleischer
64072461df Add support for package update notifications
Introduce a new notification option to receive notifications when a new
commit is pushed to a package repository.

Implements FS#30109.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07 10:54:20 +01:00
Lukas Fleischer
aa5e58db81 Add global comment notification setting
Add a configuration option to the account edit page that allows for
globally enabling/disabling package base comment notifications.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07 10:52:05 +01:00
Lukas Fleischer
3412de21d3 Rename the CommentNotify table to PackageNotifications
As a preparatory step to adding support for package notifications on
events other than comments, rename the database table accordingly.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07 10:39:22 +01:00
Lukas Fleischer
f8b3cb97e5 Fix issues reported by pyflakes
Fix several style issues and remove unneeded imports/assignments.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-06 16:23:01 +01:00
Lukas Fleischer
8f870cc5f4 notify: Do not break overly long words
Fixes FS#46937.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Lukas Fleischer
e45609cf66 notify: Do not pass notification texts via pipes
Directly retrieve comments from the database instead of additionally
passing them via stdin.

Fixes FS#46742.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:58 +01:00
Lukas Fleischer
d87b138a89 notify: Fix merging of header dicts
Fixes another regression introduced in c764999 (notify: Split out email
header generation, 2015-10-10).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-11-12 11:47:20 +01:00
Lukas Fleischer
4411a55ec9 Send notifications when changing co-maintainership
Implements FS#45590.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17 17:33:45 +02:00
Lukas Fleischer
34800e5ecf notify: Fix welcome/flag notifications
Fixes two regressions introduced in commit 6681e56 (notify: Do not wrap
references, 2015-10-03).

Fixes FS#46742.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17 17:31:48 +02:00
Lukas Fleischer
092e00f468 notify: Fix references in request notifications
When sending notifications upon request creation, set an initial message
ID instead of setting the Reply-To and References headers.

This used to work but the behavior was unintentionally changed in
9746a65 (Port notification routines to Python, 2015-06-27).

Fixes FS#46645.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17 17:31:48 +02:00
Lukas Fleischer
c76499993f notify: Split out email header generation
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17 17:31:46 +02:00
Lukas Fleischer
6681e56551 notify: Do not wrap references
When sending notifications, do not wrap lines from the references
section.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 18:12:40 +02:00
Lukas Fleischer
34e7f7084a Transfer notifications when merging packages
When a package base is merged into another one, followers of the old
package base usually want to be notified about comments the new package
base as well.

Fixes FS#27687.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-16 22:05:40 +02:00
Lukas Fleischer
396e50bdc8 Require comments when flagging packages out-of-date
Implements FS#42827.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:14:26 +02:00
Lukas Fleischer
a46f34a6c0 notify: Reword notification emails
* Use numbered references for links.
* Reword some messages.
* Fix a typo.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Lukas Fleischer
9746a65473 Port notification routines to Python
Use a Python script for sending notification emails. The notification
action and additional parameters are passed via command line arguments.
For comment and package request notifications, the text is passed via
stdin.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00