mirror of
https://github.com/peter-evans/create-pull-request.git
synced 2026-12-06 05:12:56 +00:00
feat: add truncate warning to pull request body
This commit is contained in:
1 parent
21d8ea09d5
commit
9606fe7fd0
2 files changed
+8
-2
No files matched your search
@@ -52,7 +52,10 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user