Skip to content

Commit 7c20807

Browse files
changelog: Remove duplicate PRs (#1999)
1 parent 1710fb0 commit 7c20807

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

resources/gen-changelog.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ async function batchCommitInfo(commits) {
214214
}
215215

216216
function commitsInfoToPRs(commits) {
217-
const prs = [];
217+
const prs = {};
218218
for (const commit of commits) {
219219
const associatedPRs = commit.associatedPullRequests.nodes.filter(
220220
pr => pr.repository.nameWithOwner === 'graphql/graphql-js',
@@ -243,16 +243,17 @@ function commitsInfoToPRs(commits) {
243243
`PR #${pr.number} has conflicting labels: ` + labels.join('\n'),
244244
);
245245
}
246-
prs.push({
246+
247+
prs[pr.number] = {
247248
number: pr.number,
248249
title: pr.title,
249250
url: pr.url,
250251
author: pr.author,
251252
label: labels[0],
252-
});
253+
};
253254
}
254255

255-
return prs;
256+
return Object.values(prs);
256257
}
257258

258259
async function getCommitsInfo(commits) {

0 commit comments

Comments
 (0)