Merge pull request #1228 from mikepenz/feature/minor_adjustments

Minor improvements
This commit is contained in:
Mike Penz
2023-08-25 12:10:14 +02:00
committed by GitHub
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -559,7 +559,7 @@ it('Use Rules to include a PR within a Category.', async () => {
exclude_labels: ['Fix'], exclude_labels: ['Fix'],
rules: [ rules: [
{ {
pattern: '[ABC-1234]', pattern: '\\[ABC-1234\\]',
on_property: 'title' on_property: 'title'
}, },
{ {
Generated Vendored
+3 -3
View File
@@ -1254,7 +1254,7 @@ function buildRegex(regex, target, onProperty, method, onEmpty) {
}; };
} }
catch (e) { catch (e) {
core.warning(`⚠️ Bad replacer regex: ${regex.pattern}`); core.warning(`⚠️ Bad regex: ${regex.pattern} (${e})`);
return null; return null;
} }
} }
@@ -2056,7 +2056,7 @@ function buildChangelog(diffInfo, origPrs, options) {
} }
else { else {
if (!valid) if (!valid)
core.warning(`⚠️ Extracted reference 'isNaN': ${extracted}`); core.debug(`⚠️ Extracted reference 'isNaN': ${extracted}`);
remappedPrs.push(pr); remappedPrs.push(pr);
} }
} }
@@ -2169,7 +2169,7 @@ function buildChangelog(diffInfo, origPrs, options) {
if (category.exhaustive_rules !== undefined) { if (category.exhaustive_rules !== undefined) {
exhaustive_rules = category.exhaustive_rules; exhaustive_rules = category.exhaustive_rules;
} }
if (matched && category.rules !== undefined) { if ((matched || category.labels === undefined) && category.rules !== undefined) {
matched = (0, regexUtils_2.matchesRules)(category.rules, pr, exhaustive_rules); matched = (0, regexUtils_2.matchesRules)(category.rules, pr, exhaustive_rules);
} }
} }
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -54,7 +54,7 @@ export function buildRegex(
onEmpty onEmpty
} }
} catch (e) { } catch (e) {
core.warning(`⚠️ Bad replacer regex: ${regex.pattern}`) core.warning(`⚠️ Bad regex: ${regex.pattern} (${e})`)
return null return null
} }
} }
+2 -2
View File
@@ -62,7 +62,7 @@ export function buildChangelog(diffInfo: DiffInfo, origPrs: PullRequestInfo[], o
} }
parent.childPrs.push(pr) parent.childPrs.push(pr)
} else { } else {
if (!valid) core.warning(`⚠️ Extracted reference 'isNaN': ${extracted}`) if (!valid) core.debug(`⚠️ Extracted reference 'isNaN': ${extracted}`)
remappedPrs.push(pr) remappedPrs.push(pr)
} }
} else { } else {
@@ -197,7 +197,7 @@ export function buildChangelog(diffInfo: DiffInfo, origPrs: PullRequestInfo[], o
if (category.exhaustive_rules !== undefined) { if (category.exhaustive_rules !== undefined) {
exhaustive_rules = category.exhaustive_rules 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) matched = matchesRules(category.rules, pr, exhaustive_rules)
} }
} else { } else {