Skip to content

Conversation

@boomanaiden154
Copy link
Contributor

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

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 llvm#165020
@llvmbot
Copy link
Member

llvmbot commented Nov 2, 2025

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/166081.diff

1 Files Affected:

  • (modified) .github/workflows/llvm-bugs.yml (+6)
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) +
+                  "<truncated>Please see the issue for the entire body."
+              }
               const payload = {
                 author : issue.data.user.login,
                 issue  : issue.data.number,

@boomanaiden154 boomanaiden154 merged commit 645a9ed into llvm:main Nov 3, 2025
14 checks passed
@boomanaiden154 boomanaiden154 deleted the llvm-bugs-truncate branch November 3, 2025 17:03
repo: context.repo.repo
})
.then((issue) => {
var maybeTruncatedBody = issue.data.body;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this actually used?

I'd imagine it should replace body : issue.data.body in body : issue.data.body below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Fixed in 009706f.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it work if I retry https://github.com/llvm/llvm-project/actions/runs/18784813915/job/54401896261 now or is it for new issues only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget if rerunning the workflow pulls in new workflow definitions or not. I think it would use the old workflow definition. So either a new issue or a new workflow run, but the workflow only triggers when issues get opened. So it would probably have to be a new issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing and reopening might work.

boomanaiden154 added a commit that referenced this pull request Nov 3, 2025
\#166081 forgot to actually use this as the body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auto-subscribe fails when issue body is large

4 participants