Merge pull request #1228 from mikepenz/feature/minor_adjustments
Minor improvements
This commit is contained in:
@@ -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'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-3
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -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
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user