From 6e2d9ccd468967d158f577c358f1831048fdbbc5 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Fri, 25 Aug 2023 09:52:18 +0000 Subject: [PATCH] - include error in log for bad replacer regex - allow category only with rules (and no labels) in exhaustive mode --- pr-collector/src/regexUtils.ts | 2 +- src/transform.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pr-collector/src/regexUtils.ts b/pr-collector/src/regexUtils.ts index 63521f3..40b4290 100644 --- a/pr-collector/src/regexUtils.ts +++ b/pr-collector/src/regexUtils.ts @@ -54,7 +54,7 @@ export function buildRegex( onEmpty } } catch (e) { - core.warning(`⚠️ Bad replacer regex: ${regex.pattern}`) + core.warning(`⚠️ Bad regex: ${regex.pattern} (${e})`) return null } } diff --git a/src/transform.ts b/src/transform.ts index a399970..6bc88eb 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -197,7 +197,7 @@ export function buildChangelog(diffInfo: DiffInfo, origPrs: PullRequestInfo[], o if (category.exhaustive_rules !== undefined) { exhaustive_rules = category.exhaustive_rules } - if (matched && category.rules !== undefined) { + if ((matched || category.labels === undefined) && category.rules !== undefined) { matched = matchesRules(category.rules, pr, exhaustive_rules) } } else {