- introduce the ability to reference parent / child PR relationships
- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/1074 - optimize placeholder removal - only keep placeholders in array if we have values
This commit is contained in:
@@ -266,7 +266,7 @@ pullRequestsWithLabels.push(
|
||||
repoName: 'test-repo',
|
||||
labels: ['issue', 'fix'],
|
||||
milestone: '',
|
||||
body: 'no magic body for this matter',
|
||||
body: 'no magic body for this matter - #1',
|
||||
assignees: [],
|
||||
requestedReviewers: [],
|
||||
approvedReviewers: [],
|
||||
@@ -399,6 +399,26 @@ it('Deduplicate duplicated PRs DESC', async () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('Reference PRs', async () => {
|
||||
const customConfig = Object.assign({}, DefaultConfiguration)
|
||||
customConfig.categories = [
|
||||
{
|
||||
title: '',
|
||||
labels: []
|
||||
}
|
||||
]
|
||||
customConfig.pr_template = "${{NUMBER}} -- ${{REFERENCED[*].number}}"
|
||||
customConfig.reference = {
|
||||
pattern: '.*\ \#(.).*',
|
||||
on_property: 'body',
|
||||
method: 'replace',
|
||||
target: '$1'
|
||||
}
|
||||
expect(buildChangelogTest(customConfig, pullRequestsWithLabels)).toStrictEqual(
|
||||
`1 -- 2\n4 -- \n3 -- \n\n`
|
||||
)
|
||||
})
|
||||
|
||||
it('Use empty_content for empty category', async () => {
|
||||
const customConfig = Object.assign({}, DefaultConfiguration)
|
||||
customConfig.categories = [
|
||||
|
||||
Reference in New Issue
Block a user