diff options
| author | Vosjedev <vosje@vosjedev.net> | 2025-11-17 18:23:23 +0100 |
|---|---|---|
| committer | Vosjedev <vosje@vosjedev.net> | 2025-11-17 18:23:23 +0100 |
| commit | 307569a3e64a2ae6ce9f97309dcb26a54c3f2e73 (patch) | |
| tree | f5a3103d2f407d2e0f111b2256255155af09dcbc /src/acit/emailcommands.py | |
| parent | 520038f61516e6e10835c7f70511d2f21898cfe0 (diff) | |
| download | acit-307569a3e64a2ae6ce9f97309dcb26a54c3f2e73.tar.gz acit-307569a3e64a2ae6ce9f97309dcb26a54c3f2e73.tar.bz2 acit-307569a3e64a2ae6ce9f97309dcb26a54c3f2e73.tar.xz | |
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
Diffstat (limited to 'src/acit/emailcommands.py')
| -rw-r--r-- | src/acit/emailcommands.py | 16 |
1 files changed, 16 insertions, 0 deletions
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 <state> + r'TYPE (BUG|DISCUS|PATCH)|' # a type change, TYPE <type> + r'SUBJECT .*|' # a subject change, SUBJECT <any valid text without newlines> + r'DESCRIPTION( @[0-9]*(:[0-9]*)?)?\r?\n(.*|\r?\n)*\r?\nDESCRIPTION END|' # DESCRIPTION [@<startingline[:<endingline]]\n<any valid text including newlines>\nEND DESCRIPTION + r'(UN)?PERMIT .*)' # change command permission for an emailaddress, (UN)PERMIT <email> + ,mailtext) + + + |
