diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-04-12 14:11:05 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2023-04-12 20:13:51 +0200 |
| commit | 6ecb91f6d1adf05bca5bf9c6acfbcc652642609f (patch) | |
| tree | 90b29cb3fce1036c1f9181028404b96b2191c4d6 /pkg/email/lore/parse_test.go | |
| parent | a21588f3fe5342d5f0d565c589da83a53a0bd095 (diff) | |
pkg/email/lore: better classify emails
Patches are not always spelled upper case. Also, looking for just PATCH
may lead to false positives, so first put the subject to lower case and
then look for the "[patch" substring.
Diffstat (limited to 'pkg/email/lore/parse_test.go')
| -rw-r--r-- | pkg/email/lore/parse_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/email/lore/parse_test.go b/pkg/email/lore/parse_test.go index b521d694f..a138139b5 100644 --- a/pkg/email/lore/parse_test.go +++ b/pkg/email/lore/parse_test.go @@ -263,6 +263,12 @@ func TestDiscussionType(t *testing.T) { }, { msg: &email.Email{ + Subject: "[patch v3] Bla-bla", + }, + ret: dashapi.DiscussionPatch, + }, + { + msg: &email.Email{ Subject: "[syzbot] Monthly ext4 report", OwnEmail: true, }, |
