- expand configuration specification by offering sorting by alternative properties -> title instead of mergedAt.
- add more testcases to cover the new sort orders - FIX https://github.com/mikepenz/release-changelog-builder-action/issues/757
This commit is contained in:
+2
-3
@@ -15,8 +15,7 @@ export function buildChangelog(
|
||||
// sort to target order
|
||||
const config = options.configuration
|
||||
const sort = config.sort || DefaultConfiguration.sort
|
||||
const sortAsc = sort.toUpperCase() === 'ASC'
|
||||
prs = sortPullRequests(prs, sortAsc)
|
||||
prs = sortPullRequests(prs, sort)
|
||||
core.info(`ℹ️ Sorted all pull requests ascending: ${sort}`)
|
||||
|
||||
// drop duplicate pull requests
|
||||
@@ -44,7 +43,7 @@ export function buildChangelog(
|
||||
core.info(
|
||||
`ℹ️ Removed ${removedElements} pull requests during deduplication`
|
||||
)
|
||||
prs = sortPullRequests(deduplicatedPRs, sortAsc) // resort deduplicatedPRs
|
||||
prs = sortPullRequests(deduplicatedPRs, sort) // resort deduplicatedPRs
|
||||
} else {
|
||||
core.warning(`⚠️ Configured \`duplicate_filter\` invalid.`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user