[changelog] fix npe in regex prefix logic Relates to #386

This commit is contained in:
Andrea Bettich
2021-10-05 10:23:53 +02:00
committed by Andres Almiray
parent d06fbb796a
commit 4b3ca97d51

View File

@@ -446,7 +446,7 @@ public class ChangelogGenerator {
} }
} }
if (isNotBlank(labeler.getBody())) { if (isNotBlank(labeler.getBody())) {
if (labeler.getTitle().startsWith(REGEX_PREFIX)) { if (labeler.getBody().startsWith(REGEX_PREFIX)) {
if (commit.body.matches(labeler.getBody().substring(REGEX_PREFIX.length()))) { if (commit.body.matches(labeler.getBody().substring(REGEX_PREFIX.length()))) {
commit.labels.add(labeler.getLabel()); commit.labels.add(labeler.getLabel());
} }