Commit Graph

13 Commits

Author SHA1 Message Date
Mario Limonciello bfd5f0b9d5 Make email replies more resilient
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-11-16 10:55:13 -06:00
Mario Limonciello 8228c2222f Try both utf-8 and windows-1252 for decoding email
Recent submissions from Cirrus were classified as spam by the lore
analysis robot script.  This is because cirrus used windows-1252 for
the encoding which failed to decode as utf-8.

Try both encodings when decoding email.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-11-16 10:42:10 -06:00
Mario Limonciello d011ba69eb Add a workaround for gitlab.freedesktop.org pull requests
Some of these pull requests are submitted using git protocol
in the pull request which b4 won't be able to handle. Manually
swap out for the https protocol.

Signed-off-by: Mario Limonciello <superm1@gmail.com>
2023-11-13 22:02:26 -06:00
Mario Limonciello 05ac293be9 Add extra debugging output when processing pull requests
Signed-off-by: Mario Limonciello <superm1@gmail.com>
2023-11-13 22:01:52 -06:00
Mario Limonciello 1f8f61d5cd Process pull requets directly from mbox
Rather than letting b4 fetch a second time use the same one
that was already downloaded.

Signed-off-by: Mario Limonciello <superm1@gmail.com>
2023-11-13 22:01:03 -06:00
Mario Limonciello cc8a7d1024 Fix classification of some pull requests
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-11-08 15:56:18 -06:00
Josh Boyer 4ee0175651 Merge branch 'mlimonci/use-am' into 'main'
Use `git am` instead of `b4 shazam`

See merge request kernel-firmware/linux-firmware!40
2023-10-24 11:20:25 +00:00
Mario Limonciello 39d5539233 Use `git am` instead of `b4 shazam`
There appears to be problems with `b4 am` with binary diffs, but there
also doesn't seem to be need to use b4 in this case.

Switch over to just applying the mbox directly.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-10-23 10:18:21 -05:00
Mario Limonciello 7bfa5f4d10 Catch unicode decode errors
emails with spam might have non-ASCII characters, don't let the script explode.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-10-23 10:10:47 -05:00
Mario Limonciello 6ed754659e Fix the robot email script
```
Traceback (most recent call last):
  File "~/linux-firmware-robot/./contrib/process_linux_firmware.py", line 339, in <module>
    process_database(conn, remote)
  File "~/linux-firmware-robot/./contrib/process_linux_firmware.py", line 276, in process_database
    reply_email(mbox, branch)
  File "~/linux-firmware-robot/./contrib/process_linux_firmware.py", line 86, in reply_email
    reply["To"] += email.utils.formataddr(target)
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
```

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-10-19 12:16:32 -05:00
Mario Limonciello ecaeef5dcb Add support for sending emails while processing a PR/patch
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-10-18 21:12:07 -05:00
Mario Limonciello 4d6190714d Add a script for a robot to open up pull requests
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-10-13 13:50:00 -05:00
Mario Limonciello cef80743ca Add new Makefile target to build a deb and rpm package
The package would put all files into /lib/firmware/updates to avoid
conflicting with distro packages.

The package is also intentionally named to avoid conflicts with
distro packages.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2023-10-02 14:19:30 -05:00