Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
: [];

const prNumbers = [];
const pullRequests = new Map();
const seenPullRequests = new Set();
const directCommits = [];

for (const commit of commits) {
Expand All @@ -152,9 +152,9 @@ jobs:
continue;
}

if (!pullRequests.has(pullRequest.number)) {
if (!seenPullRequests.has(pullRequest.number)) {
prNumbers.push(pullRequest.number);
pullRequests.set(pullRequest.number, pullRequest);
seenPullRequests.add(pullRequest.number);
addContributor(pullRequest.user);
}
}
Expand All @@ -166,27 +166,17 @@ jobs:
}

for (const number of prNumbers) {
const pullRequest = pullRequests.get(number);
const prCommits = await github.paginate(github.rest.pulls.listCommits, {
owner,
repo,
pull_number: number,
per_page: 100,
});

lines.push(
`- ${pullRequest.title} ([#${number}](${prUrl(number)}))`
);

for (const commit of prCommits) {
addContributor(commit.author);
}

if (prCommits.length > 1) {
for (const commit of prCommits) {
const subject = commit.commit.message.split("\n")[0];
lines.push(` - ${subject}`);
}
const subject = commit.commit.message.split("\n")[0];
lines.push(`- ${subject} ([#${number}](${prUrl(number)}))`);
}
}

Expand Down
Loading