Skip to content

Commit 6b14e5e

Browse files
authored
Merge pull request #48 from fox-forks/hyperupcall-hyperupcall-review-comments-errors
Do not throw error on review comments
2 parents 26bc250 + 70049e2 commit 6b14e5e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ function getPayloadBody() {
132132
if (context.payload?.review?.state === 'approved' && body === null) {
133133
body = ''
134134
}
135+
/**
136+
* Comments on pull request reviews have a "null" body.
137+
*/
138+
if (context.payload?.review?.state === 'commented' && body === null) {
139+
body = ''
140+
}
135141
if (body == null) {
136142
throw new Error(`No body found, ${JSON.stringify(context)}`)
137143
}

0 commit comments

Comments
 (0)