Skip to content

Commit

Permalink
Check if PR body is null (#969)
Browse files Browse the repository at this point in the history
  • Loading branch information
frundh committed Dec 13, 2021
1 parent ac01fc2 commit 9fb7516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -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)
Expand Down

0 comments on commit 9fb7516

Please sign in to comment.