aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/email/parser_test.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/email: add tests for base-commit extractionPimyn Girgis2026-01-091-0/+110
|
* pkg/email: decode rfc2047 subjectsAleksandr Nogikh2025-10-151-0/+21
| | | | | It's not done transparently by the email library. Add a test that verifies the result.
* all: apply linter auto fixesTaras Madan2025-07-171-3/+3
| | | | ./tools/syz-env bin/golangci-lint run ./... --fix
* pkg/email: share raw email addressesAleksandr Nogikh2025-07-101-0/+21
| | | | These will be necessary to properly route emails in dashboard.
* dashboard: adapt to the new Googe Groups footerAleksandr Nogikh2024-10-251-0/+29
| | | | | | It changed recently and it broke our email discussion link extraction. Closes #5431.
* dashboard: auto-guess kernel and repo for #syz testAleksandr Nogikh2023-09-061-2/+13
| | | | | We used to support this only for external reportings, but let's auto-guess these parameters for all incoming patch testing commands.
* dashboard: support bug labelsAleksandr Nogikh2023-04-271-0/+10
| | | | | | | | | | | | | | | | Let bug labels come in three flavours: 1) Bug labels with multiple values (e.g. `subsystems`). 2) Bug labels with only one value (e.g. `prio`). 3) Flags. Let users configure bug labels via email by issuing the following commands: #syz set subsystems: abc, def #syz set no-reminders #syz unset no-reminders Also let users set tags for invididual bugs in reported bug lists: #syz set <1> some-tag
* pkg/email: support multiple commandsAleksandr Nogikh2023-04-271-126/+233
| | | | | | | | | | 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: expose OwnEmail flagAleksandr Nogikh2023-04-121-0/+1
| | | | | We anyway already extract this information, there's no sense in extracting it again in other places.
* pkg/email: parse multiple In-Reply-To message IDsAleksandr Nogikh2023-04-121-0/+28
| | | | | Even though the standard seems to prohibit it, there are real world cases of messages with multiple IDs in an "In-Reply-To" header.
* pkg/email: extract more informationAleksandr Nogikh2023-04-061-5/+118
| | | | | | | | | Extract Date and InReplyTo. Extract not just one, but multiple BugIDs from multiple sources: 1) Email addresses in From/To/Cc. 2) Email addresses in Body. 3) Dashboard links in Body.
* pgk/email: parse the new "set" commandAleksandr Nogikh2023-02-241-0/+8
| | | | For now this command will be used to manually set bug's subsystems.
* all: tools/syz-env make generate resultTaras Madan2023-02-241-2/+2
|
* pkg/email: tolerate newline characters after #syzAleksandr Nogikh2022-11-291-0/+27
| | | | It look like email clients can insert newlines there if the line is too long.
* pkg/email: detect author and mailing listAleksandr Nogikh2022-11-211-17/+65
| | | | | | Handle two types of mailing list responses: * From contains the original author. * From is replaced by the mailing list.
* dashboard: reduce CanonicalEmail callsAleksandr Nogikh2022-11-211-12/+12
| | | | | | | Sometimes we call it before accessing emails, sometimes we do not. This is prone to errors. Always canonicalize From and Cc, this should somewhat reduce the problem.
* pkg/email: add support for Sender extractionAleksandr Nogikh2022-11-071-4/+7
|
* pkg/email: strip \t in test command argsDmitry Vyukov2021-03-091-0/+18
| | | | | | There was a precedent of using: syz fix: repo \t commit This was rejected as error. Support \t between tokens.
* pkg/email: accept #syz- prefix for commandsDmitry Vyukov2020-01-071-0/+18
| | | | | Some users spell the command as "#syz-dup:". Support this and few more variations.
* pkg/email: allow commands in subjectDmitry Vyukov2019-05-131-2/+21
| | | | | | Several users attempted this and there does not seem to be any reason to not allow this. So parse out command from subject as well.
* dashboard/app: restore printing of email commandsDmitry Vyukov2019-05-081-13/+33
| | | | | | | After commit 9ad9ef29caa52714dd5faff167e4b61643e40a7e we started saying "your command '3' is accepted" because we use numbers now. Keep string representation of the command when parsing and use it in reply emails.
* pkg/email: support quilt patch formatAndrey Konovalov2019-04-231-2/+6
| | | | | Quilt uses a slightly different patch format to traditional git diff/format-patch. Support it.
* dashboard/app: slightly relax command parsingDmitry Vyukov2019-03-221-30/+56
| | | | | Users have misspelled test: multiple times. Accept commands without the colon.
* pkg/email, pkg/vcs: test that OpenBSD-style commits are handledDmitry Vyukov2018-10-111-0/+32
| | | | | | OpenBSD does not use "first line is title" convention, so test that this is parsed properly. Also test that multi-line fix/dup commands are properly parsed.
* pkg/email: support quoted-printable emailsDmitry Vyukov2018-06-181-4/+52
| | | | | | We did not handle quoted-printable because mime package handles it. But we can have a non-mime email in quoted-printable. Simply handle it always, it's not hard.
* gometalinter: enable line length checkingDmitry Vyukov2018-05-041-0/+1
| | | | | | | 120 columns looks like a reasonable limit and requires few changes to existing code. Update #538
* all: fix gometalinter warningsDmitry Vyukov2018-03-081-0/+3
| | | | Fix typos, non-canonical code, remove dead code, etc.
* pkg/email: handle emails without Content-Type headerDmitry Vyukov2018-01-241-1/+0
| | | | | git-send-email sends emails without Content-Type, let's assume it's text.
* pkg/email: don't add <> to email when name is emptyDmitry Vyukov2017-12-281-0/+18
| | | | Just unnecessary clutter.
* dashboard/app: extract fixing tags from commitsDmitry Vyukov2017-12-271-1/+1
| | | | | | | | | | | | | Support the new scheme of associating fixing commits with bugs. Now we provide a tag along the lines of: Reported-by: <syzbot+a4a91f6fc35e102@syzkaller.appspotmail.com> The tag is supposed to be added to the commit. Then we parse commit logs and extract these tags. The final part on the dashboard is not ready yet, but syz-ci should already parse and send the tags.
* pkg/email: improve parsing of splitted linesDmitry Vyukov2017-12-191-12/+36
| | | | | | | | | | Allow: full-commit-title-on-next-line This allows commit titles between 70 and 80 cols with gmail. Also be more permissive wrt spaces and tabs.
* pkg/email: unsplit arguments for test commandDmitry Vyukov2017-11-171-1/+65
|
* pkg/email: truncate garbage after patchesDmitry Vyukov2017-11-171-3/+3
|
* dashboard/app: email fixesDmitry Vyukov2017-10-311-0/+13
| | | | | | | 1. Allows sending emails upstream. 2. Filter out duplicate emails coming from our mailing lists. 3. Increase retry attempts for email commands (don't want them to fail due to concurrent crash reports from managers).
* dashboard/app: heavylifting of email reportingDmitry Vyukov2017-08-171-42/+84
| | | | | | | | | - save Message-ID and use In-Reply-To in subsequent messages - remember additional CC entries added manually - don't mail to maintainers if maintainers list is empty - improve mail formatting and add a footer - implement upstream/fix/dup/invalid commands over email - add tests
* pkg/email: fix bug in context extractionDmitry Vyukov2017-07-051-3/+3
| | | | Compare email addresses without full name.
* pkg/email: add AddAddrContext/RemoveAddrContextDmitry Vyukov2017-07-051-32/+49
| | | | Replace extractBugID function with more general AddAddrContext/RemoveAddrContext.
* pkg/email: don't add own email address to CC listDmitry Vyukov2017-07-031-4/+8
| | | | Otherwise we we send each reply to ourselves and receive it again.
* pkg/email: add email parsing functionalityDmitry Vyukov2017-07-021-0/+344
Parse extracts all potentially interesting info from an incoming email.