File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,11 @@ function createPullRequest(inputs) {
334
334
// Update the body input with the contents of the file
335
335
inputs.body = utils.readFile(inputs.bodyPath);
336
336
}
337
+ // 65536 characters is the maximum allowed for the pull request body.
338
+ if (inputs.body.length > 65536) {
339
+ core.warning(`Pull request body is too long. Truncating to 65536 characters.`);
340
+ inputs.body = inputs.body.substring(0, 65536);
341
+ }
337
342
// Get the repository path
338
343
const repoPath = utils.getRepoPath(inputs.path);
339
344
// Create a git command manager
Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
46
46
// Update the body input with the contents of the file
47
47
inputs . body = utils . readFile ( inputs . bodyPath )
48
48
}
49
+ // 65536 characters is the maximum allowed for the pull request body.
50
+ if ( inputs . body . length > 65536 ) {
51
+ core . warning (
52
+ `Pull request body is too long. Truncating to 65536 characters.`
53
+ )
54
+ inputs . body = inputs . body . substring ( 0 , 65536 )
55
+ }
49
56
50
57
// Get the repository path
51
58
const repoPath = utils . getRepoPath ( inputs . path )
You can’t perform that action at this time.
0 commit comments