Skip to content

Commit 70049e2

Browse files
committed
Do not throw error on review comments
1 parent d085674 commit 70049e2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

+6
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ function getPayloadBody() {
130130
if (context.payload?.review?.state === 'approved' && body === null) {
131131
body = ''
132132
}
133+
/**
134+
* Comments on pull request reviews have a "null" body.
135+
*/
136+
if (context.payload?.review?.state === 'commented' && body === null) {
137+
body = ''
138+
}
133139
if (body == null) {
134140
throw new Error(`No body found, ${JSON.stringify(context)}`)
135141
}

0 commit comments

Comments
 (0)