diff --git a/dist/index.js b/dist/index.js index 1c84bf4..cb568b3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -337,7 +337,10 @@ function createPullRequest(inputs) { // 65536 characters is the maximum allowed for the pull request body. if (inputs.body.length > 65536) { core.warning(`Pull request body is too long. Truncating to 65536 characters.`); - inputs.body = inputs.body.substring(0, 65536); + const truncateWarning = '...*[Pull request body truncated]*'; + inputs.body = + inputs.body.substring(0, 65536 - truncateWarning.length) + + truncateWarning; } // Get the repository path const repoPath = utils.getRepoPath(inputs.path); diff --git a/src/create-pull-request.ts b/src/create-pull-request.ts index 12dddb8..1e7b8ba 100644 --- a/src/create-pull-request.ts +++ b/src/create-pull-request.ts @@ -52,7 +52,10 @@ export async function createPullRequest(inputs: Inputs): Promise { core.warning( `Pull request body is too long. Truncating to 65536 characters.` ) - inputs.body = inputs.body.substring(0, 65536) + const truncateWarning = '...*[Pull request body truncated]*' + inputs.body = + inputs.body.substring(0, 65536 - truncateWarning.length) + + truncateWarning } // Get the repository path