All of lore.kernel.org
 help / color / mirror / Atom feed
* [patchwork][PATCH] patchwork/bin/parsemail: Make "[PATCH" prefix mandatory
@ 2017-01-06 23:03 Jose Lamego
  2017-01-09 10:49 ` Patrick Ohly
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Lamego @ 2017-01-06 23:03 UTC (permalink / raw)
  To: yocto

Patchwork may incorrectly identify emails containing patch-like content as
patches.
This change makes "[PATCH" prefix in subject mandatory for emails to be
considered as new patches.

[YOCTO #10764]

Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
---
 patchwork/bin/parsemail.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py
index 476118d..8d6529c 100755
--- a/patchwork/bin/parsemail.py
+++ b/patchwork/bin/parsemail.py
@@ -399,7 +399,8 @@ def find_content(project, mail):
     refs = build_references_list(mail)
     is_root = refs == []
     is_cover_letter = is_root and x == 0
-    is_patch = patchbuf is not None
+    patch_prefix = re.search('\[\s*PATCH', mail.get('Subject'))
+    is_patch = patchbuf is not None and patch_prefix
 
     drop_patch = not is_attachment and \
         project.git_send_email_only and not is_git_send_email(mail)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-11 17:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-06 23:03 [patchwork][PATCH] patchwork/bin/parsemail: Make "[PATCH" prefix mandatory Jose Lamego
2017-01-09 10:49 ` Patrick Ohly
2017-01-09 22:34   ` Jose Lamego
2017-01-11 17:01     ` [patchwork][PATCH] patchwork/bin/parsemail: Improve new patch filtering Jose Lamego

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.