- slightly improve filtering code

- format config / readme
This commit is contained in:
Mike Penz
2021-04-30 10:29:09 +02:00
parent c49b84ec4a
commit 3a59a463ad
4 changed files with 51 additions and 38 deletions
+4 -3
View File
@@ -128,11 +128,12 @@ export class ReleaseNotes {
return commmit.sha
})
// retrieve base branches we allow
const baseBranches = configuration.base_branches || DefaultConfiguration.base_branches
const allBaseBranchesAllowed = baseBranches.length === 0
// return only the pull requests associated with this release
return pullRequests.filter(pr => {
const baseBranches = configuration.base_branches || DefaultConfiguration.base_branches
const allBaseBranchesAllowed = baseBranches.length === 0
return releaseCommitHashes.includes(pr.mergeCommitSha)
&& (allBaseBranchesAllowed || baseBranches.includes(pr.baseBranch))
})