Merge pull request #77 from peter-evans/dev
(fix) handle case when pull request body is null
This commit is contained in:
Vendored
+3
-1
@@ -1560,7 +1560,9 @@ function run() {
|
||||
if (isPullRequest) {
|
||||
const pullRequest = yield githubHelper.getPull(github.context.repo, github.context.payload.issue.number);
|
||||
// Truncate the body to keep the size of the payload under the max
|
||||
pullRequest.body = pullRequest.body.slice(0, 1000);
|
||||
if (pullRequest.body) {
|
||||
pullRequest.body = pullRequest.body.slice(0, 1000);
|
||||
}
|
||||
clientPayload['pull_request'] = pullRequest;
|
||||
}
|
||||
// Dispatch for each matching configuration
|
||||
|
||||
+3
-1
@@ -164,7 +164,9 @@ async function run(): Promise<void> {
|
||||
github.context.payload.issue.number
|
||||
)
|
||||
// Truncate the body to keep the size of the payload under the max
|
||||
pullRequest.body = pullRequest.body.slice(0, 1000)
|
||||
if (pullRequest.body) {
|
||||
pullRequest.body = pullRequest.body.slice(0, 1000)
|
||||
}
|
||||
clientPayload['pull_request'] = pullRequest
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user