add possibility to configure if rules are and/or independently from labels
This commit is contained in:
+10
-2
@@ -133,8 +133,12 @@ export function buildChangelog(diffInfo: DiffInfo, prs: PullRequestInfo[], optio
|
||||
pr.labels
|
||||
)
|
||||
}
|
||||
let exclusive_rules = true
|
||||
if (category.exclusive_rules !== undefined) {
|
||||
exclusive_rules = category.exclusive_rules
|
||||
}
|
||||
if (matched && category.rules !== undefined) {
|
||||
matched = matchesRules(category.rules, pr, true)
|
||||
matched = matchesRules(category.rules, pr, exclusive_rules)
|
||||
}
|
||||
} else {
|
||||
// if not exhaustive, do individual matches
|
||||
@@ -145,9 +149,13 @@ export function buildChangelog(diffInfo: DiffInfo, prs: PullRequestInfo[], optio
|
||||
pr.labels
|
||||
)
|
||||
}
|
||||
let exclusive_rules = false
|
||||
if (category.exclusive_rules !== undefined) {
|
||||
exclusive_rules = category.exclusive_rules
|
||||
}
|
||||
if (!matched && category.rules !== undefined) {
|
||||
// if no label did apply, check if any rule applies
|
||||
matched = matchesRules(category.rules, pr, false)
|
||||
matched = matchesRules(category.rules, pr, exclusive_rules)
|
||||
}
|
||||
}
|
||||
if (matched) {
|
||||
|
||||
Reference in New Issue
Block a user