- rename to exhaustive_rules
- recompile dist
This commit is contained in:
@@ -24,7 +24,7 @@ export interface Category {
|
||||
exclude_labels?: string[] // if an exclude label is detected, the PR will be excluded from this category
|
||||
rules?: Rule[] // rules to associate PRs to this category
|
||||
exhaustive?: boolean // requires all labels to be present in the PR
|
||||
exclusive_rules?: boolean // requires all rules to be present in the PR (if not set, defaults to exhaustive value)
|
||||
exhaustive_rules?: boolean // requires all rules to be present in the PR (if not set, defaults to exhaustive value)
|
||||
empty_content?: string // if the category has no matching PRs, this content will be used. If not set, the category will be skipped in the changelog.
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -133,12 +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
|
||||
let exhaustive_rules = true
|
||||
if (category.exhaustive_rules !== undefined) {
|
||||
exhaustive_rules = category.exhaustive_rules
|
||||
}
|
||||
if (matched && category.rules !== undefined) {
|
||||
matched = matchesRules(category.rules, pr, exclusive_rules)
|
||||
matched = matchesRules(category.rules, pr, exhaustive_rules)
|
||||
}
|
||||
} else {
|
||||
// if not exhaustive, do individual matches
|
||||
@@ -149,13 +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
|
||||
let exhaustive_rules = false
|
||||
if (category.exhaustive_rules !== undefined) {
|
||||
exhaustive_rules = category.exhaustive_rules
|
||||
}
|
||||
if (!matched && category.rules !== undefined) {
|
||||
// if no label did apply, check if any rule applies
|
||||
matched = matchesRules(category.rules, pr, exclusive_rules)
|
||||
matched = matchesRules(category.rules, pr, exhaustive_rules)
|
||||
}
|
||||
}
|
||||
if (matched) {
|
||||
|
||||
Reference in New Issue
Block a user