From 9fb7516333b1714cff2012a936958ed46c3f67a1 Mon Sep 17 00:00:00 2001 From: Fredrik Rundh Date: Mon, 13 Dec 2021 18:30:36 +0100 Subject: [PATCH] Check if PR body is null (#969) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 80ac51c74..dc6996ca3 100644 --- a/index.js +++ b/index.js @@ -91,7 +91,7 @@ module.exports = (app, { getRouter }) => { } } // check pr body - if (!found && autolabel.body.length > 0) { + if (!found && context.payload.pull_request.body != null && autolabel.body.length > 0) { for (const matcher of autolabel.body) { if (context.payload.pull_request.body.match(matcher)) { labels.add(autolabel.label)