File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,9 @@ jobs:
145
145
const commentText = 'Diff for ' + context.payload.pull_request.head.sha + ':';
146
146
147
147
const fs = require('fs');
148
- const diff = fs.readFileSync(process.env.GITHUB_WORKSPACE + '/oi-pr.diff').toString().trimEnd();
148
+ var diff = fs.readFileSync(process.env.GITHUB_WORKSPACE + '/oi-pr.diff').toString().trimEnd();
149
+ // GitHub has limitation 2^16 of body length
150
+ diff = diff < 60000 ? diff : diff.substring(0, 60000) + '\n=== TRUNCATED ===';
149
151
var body = "<details>\n<summary>" + commentText + "</summary>\n\n```diff\n" + diff + "\n```\n\n</details>";
150
152
const maint = fs.readFileSync(process.env.GITHUB_WORKSPACE + '/oi-pr.maint').toString().trimEnd();
151
153
if (maint.length > 0) {
You can’t perform that action at this time.
0 commit comments