From 307569a3e64a2ae6ce9f97309dcb26a54c3f2e73 Mon Sep 17 00:00:00 2001 From: Vosjedev Date: Mon, 17 Nov 2025 18:23:23 +0100 Subject: Email commands, plus 'a _bit_ more' - you can now edit bugs via email - fixed acit not resending mailinglist email correctly - make sure you don't make a new bug when receiving the first email of a bug in your inbox and replying to it - make forwarding email only delete loopback email when save argument is false - don't add empty Cc or Bcc headers to prevent errors when sending without them - make the thing that formats the In-Reply-To and References header a separate function - only update projectpages when reloading projectlist, not bugpages - fix tracker subscribers not working --- src/acit/emailcommands.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/acit/emailcommands.py (limited to 'src/acit/emailcommands.py') diff --git a/src/acit/emailcommands.py b/src/acit/emailcommands.py new file mode 100644 index 0000000..ff1ff5f --- /dev/null +++ b/src/acit/emailcommands.py @@ -0,0 +1,16 @@ + +import re + +from typing import Iterable + +def findcommands(mailtext:str) -> Iterable[re.Match]: + return re.finditer(r'\n(' # match any of: + r'STATUS (OPEN|CLOSED|UNCONF|REJECT|UPSTRM)|' # a status change, STATUS + r'TYPE (BUG|DISCUS|PATCH)|' # a type change, TYPE + r'SUBJECT .*|' # a subject change, SUBJECT + r'DESCRIPTION( @[0-9]*(:[0-9]*)?)?\r?\n(.*|\r?\n)*\r?\nDESCRIPTION END|' # DESCRIPTION [@\nEND DESCRIPTION + r'(UN)?PERMIT .*)' # change command permission for an emailaddress, (UN)PERMIT + ,mailtext) + + + -- cgit