Skip to content

Commit 645a9ed

Browse files
[Github] Truncate Bug Emails when Necessary (llvm#166081)
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
1 parent bb14b83 commit 645a9ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/llvm-bugs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ jobs:
3939
repo: context.repo.repo
4040
})
4141
.then((issue) => {
42+
var maybeTruncatedBody = issue.data.body;
43+
if (maybeTruncatedBody.length > 15000) {
44+
maybeTruncatedBody = maybeTruncatedBody.substring(0,
45+
15000) +
46+
"<truncated>Please see the issue for the entire body."
47+
}
4248
const payload = {
4349
author : issue.data.user.login,
4450
issue : issue.data.number,

0 commit comments

Comments
 (0)