From 192b60d123308466da24da1cae3900b9b34393f1 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sun, 2 Nov 2025 18:56:08 +0000 Subject: [PATCH] [Github] Truncate Bug Emails when Necessary Mailgun limits the size of an email payload to 16k. Truncate the issue body, which should be the largest part around 15k and point the user to Github to see the rest. Fixes #165020 --- .github/workflows/llvm-bugs.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/llvm-bugs.yml b/.github/workflows/llvm-bugs.yml index 7d42abfadde7b..cd3f396e7c465 100644 --- a/.github/workflows/llvm-bugs.yml +++ b/.github/workflows/llvm-bugs.yml @@ -39,6 +39,12 @@ jobs: repo: context.repo.repo }) .then((issue) => { + var maybeTruncatedBody = issue.data.body; + if (maybeTruncatedBody.length > 15000) { + maybeTruncatedBody = maybeTruncatedBody.substring(0, + 15000) + + "Please see the issue for the entire body." + } const payload = { author : issue.data.user.login, issue : issue.data.number,