File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ async function batchCommitInfo(commits) {
214214}
215215
216216function 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
258259async function getCommitsInfo ( commits ) {
You can’t perform that action at this time.
0 commit comments