add possibility to configure if rules are and/or independently from labels

This commit is contained in:
Federico M. Facca
2023-05-03 17:50:51 +02:00
parent fa8d0100dc
commit 1794edb8f3
4 changed files with 17 additions and 8 deletions
+4 -5
View File
@@ -577,7 +577,7 @@ it('Use Rules to get all open PRs in a Category.', async () => {
it('Use Rules to get current open PR and merged categorised.', async () => {
let prs = Array.from(pullRequestsWithLabels)
prs.concat(Array.from(openPullRequestsWithLabels))
prs = prs.concat(Array.from(openPullRequestsWithLabels))
const customConfig = Object.assign({}, DefaultConfiguration)
customConfig.categories = [
@@ -594,7 +594,8 @@ it('Use Rules to get current open PR and merged categorised.', async () => {
on_property: 'status'
}
],
exhaustive: true
exhaustive: true,
exclusive_rules: false
},{
title: '## 🐛 Issues',
labels: ['Issue'],
@@ -608,10 +609,8 @@ it('Use Rules to get current open PR and merged categorised.', async () => {
}
]
console.log(buildChangelogTest(customConfig, prs))
expect(buildChangelogTest(customConfig, prs)).toStrictEqual(
`## 🚀 Features\n\n- [ABC-1234] - this is a PR 1 title message\n - PR: #1\n- [ABC-1234] - this is a PR 3 title message\n - PR: #3\n- Still pending open pull request\n - PR: #6\n\n## 🐛 Issues\n\n- [ABC-4321] - this is a PR 2 title message\n - PR: #2\n- [ABC-1234] - this is a PR 3 title message\n - PR: #3\n\n`
`## 🚀 Features\n\n- [ABC-1234] - this is a PR 1 title message\n - PR: #1\n- Still pending open pull request (Current)\n - PR: #6\n- [ABC-1234] - this is a PR 3 title message\n - PR: #3\n\n## 🐛 Issues\n\n- [ABC-4321] - this is a PR 2 title message\n - PR: #2\n- [ABC-1234] - this is a PR 3 title message\n - PR: #3\n\n`
)
})