- add new ability to define exclude_labels for categories (give greater flexibility)
- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/681
This commit is contained in:
@@ -111,6 +111,26 @@ export function buildChangelog(
|
||||
|
||||
let matched = false
|
||||
for (const [category, pullRequests] of categorized) {
|
||||
// check if any exclude label matches
|
||||
if (category.exclude_labels !== undefined) {
|
||||
if (
|
||||
haveCommonElements(
|
||||
category.exclude_labels.map(lbl => lbl.toLocaleLowerCase('en')),
|
||||
pr.labels
|
||||
)
|
||||
) {
|
||||
if (core.isDebug()) {
|
||||
const prNum = pr.number
|
||||
const prLabels = pr.labels
|
||||
const excludeLabels = JSON.stringify(category.exclude_labels)
|
||||
core.debug(
|
||||
`PR ${prNum} with labels: ${prLabels} excluded from category via exclude label: ${excludeLabels}`
|
||||
)
|
||||
}
|
||||
continue // one of the exclude labels matched, skip the PR for this category
|
||||
}
|
||||
}
|
||||
|
||||
if (category.exhaustive === true) {
|
||||
if (
|
||||
haveEveryElements(
|
||||
|
||||
Reference in New Issue
Block a user