From 030e10720439813a9e4a7e4586bdc2bdc781a4c9 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 17 Apr 2023 12:49:12 +0200 Subject: pkg/email: support multiple commands It's not always convenient that we can receive only one command per email. Update pkg/email parsing code to extract everything which there is. Update reporting_email.go to handle multiple email commands. Set different limits for bug email commands and bug list commands. --- pkg/email/lore/parse_test.go | 8 -------- 1 file changed, 8 deletions(-) (limited to 'pkg/email/lore') diff --git a/pkg/email/lore/parse_test.go b/pkg/email/lore/parse_test.go index 84d3d0bdf..13370045c 100644 --- a/pkg/email/lore/parse_test.go +++ b/pkg/email/lore/parse_test.go @@ -121,7 +121,6 @@ Bug report`, Date: time.Date(2017, time.May, 7, 19, 54, 0, 0, zone), Author: "a@user.com", Cc: []string{"a@user.com"}, - Command: email.CmdNone, }, { MessageID: "", @@ -130,7 +129,6 @@ Bug report`, Author: "b@user.com", Cc: []string{"a@user.com", "b@user.com"}, InReplyTo: "", - Command: email.CmdNone, }, { MessageID: "", @@ -139,7 +137,6 @@ Bug report`, Author: "c@user.com", Cc: []string{"a@user.com", "b@user.com", "c@user.com"}, InReplyTo: "", - Command: email.CmdNone, }, }, }, @@ -156,7 +153,6 @@ Bug report`, Date: time.Date(2017, time.May, 7, 19, 57, 0, 0, zone), Author: "syzbot@bar.com", OwnEmail: true, - Command: email.CmdNone, }, { MessageID: "", @@ -166,7 +162,6 @@ Bug report`, Author: "c@user.com", Cc: []string{"c@user.com"}, InReplyTo: "", - Command: email.CmdNone, }, { MessageID: "", @@ -176,7 +171,6 @@ Bug report`, Author: "d@user.com", Cc: []string{"d@user.com"}, InReplyTo: "", - Command: email.CmdNone, }, }, }, @@ -193,7 +187,6 @@ Bug report`, Date: time.Date(2017, time.May, 7, 19, 58, 1, 0, zone), Author: "e@user.com", Cc: []string{"e@user.com"}, - Command: email.CmdNone, }, }, }, @@ -211,7 +204,6 @@ Bug report`, Cc: []string{"person@email.com"}, Subject: "Another bug discussion", Author: "person@email.com", - Command: email.CmdNone, }, }, }, -- cgit mrf-deployment