- introduce new configuration fetchViaCommits which is best suited for environments with shorter diffs and/or squash merging (1 api request per commit)

This commit is contained in:
Mike Penz
2023-07-28 10:08:07 +00:00
committed by GitHub
parent 80ac8b0a0c
commit e463dcb45c
7 changed files with 103 additions and 37 deletions
+2 -2
View File
@@ -238,7 +238,7 @@ export class PullRequests {
})
let pullRequests: PullRequestInfo[]
if (releaseCommitHashes.length < 10) {
if (options.fetchViaCommits) {
// fetch PRs based on commits instead (will get associated PRs per commit found)
const prsForReleaseCommits: Map<number, PullRequestInfo> = new Map()
for (const commit of prCommits) {
@@ -264,7 +264,7 @@ export class PullRequests {
})
core.info(`️ Retrieved ${mergedPullRequests.length} merged PRs for ${owner}/${repo}`)
let allPullRequests = mergedPullRequests
if (includeOpen) {
// retrieve all open pull requests