File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @changesets/action " : patch
3+ ---
4+
5+ Avoid searching for an existing pull request early.
Original file line number Diff line number Diff line change @@ -300,12 +300,6 @@ export async function runVersion({
300300 } ) ;
301301 }
302302
303- const existingPullRequestsPromise = octokit . rest . pulls . list ( {
304- ...github . context . repo ,
305- state : "open" ,
306- head : `${ github . context . repo . owner } :${ versionBranch } ` ,
307- base : branch ,
308- } ) ;
309303 let changedPackages = await getChangedPackages ( cwd , versionsByDirectory ) ;
310304 let changedPackagesInfoPromises = Promise . all (
311305 changedPackages . map ( async ( pkg ) => {
@@ -331,7 +325,12 @@ export async function runVersion({
331325
332326 await git . pushChanges ( { branch : versionBranch , message : finalCommitMessage } ) ;
333327
334- let existingPullRequests = await existingPullRequestsPromise ;
328+ let existingPullRequests = await octokit . rest . pulls . list ( {
329+ ...github . context . repo ,
330+ state : "open" ,
331+ head : `${ github . context . repo . owner } :${ versionBranch } ` ,
332+ base : branch ,
333+ } ) ;
335334 core . info ( JSON . stringify ( existingPullRequests . data , null , 2 ) ) ;
336335
337336 const changedPackagesInfo = ( await changedPackagesInfoPromises )
You can’t perform that action at this time.
0 commit comments