Module: tools Branch: master Commit: 26274c42d71f248d1aeff74f47c41fd0fb44e703 URL: https://gitlab.winehq.org/winehq/tools/-/commit/26274c42d71f248d1aeff74f47c4...
Author: Jeremy White jwhite@codeweavers.com Date: Mon Jul 25 14:23:59 2022 -0500
gitlab: Import email with a policy to fix UTF-8 From lines.
Should adress email glitches like this one: https://gitlab.winehq.org/wine/wine/-/merge_requests/487#note_4680
---
gitlab/gitlab-to-mail/mailtogitlab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitlab/gitlab-to-mail/mailtogitlab.py b/gitlab/gitlab-to-mail/mailtogitlab.py index bc9944a5..ccb0eebe 100755 --- a/gitlab/gitlab-to-mail/mailtogitlab.py +++ b/gitlab/gitlab-to-mail/mailtogitlab.py @@ -1,6 +1,6 @@ #!/usr/bin/env -S python3 -B
-from email import message_from_binary_file +from email import message_from_binary_file, policy from urllib.parse import urljoin
import re @@ -148,7 +148,7 @@ def post_discussion_note(mr_iid, note, replyto):
def main(): - mail = message_from_binary_file(sys.stdin.buffer) + mail = message_from_binary_file(sys.stdin.buffer, policy=email.policy.default) if not (mr_iid_and_note := parse(mail)): return try: