@@ -162,7 +162,7 @@ export default class ReleasePromotion extends Session {
162162 }
163163
164164 // Push to the remote the release tag(s), and default, release, and staging branches.
165- await this . pushToRemote ( defaultBranch , ...releases . flatMap (
165+ await this . pushToRemote ( this . upstream , defaultBranch , ...releases . flatMap (
166166 ( { version, versionComponents, workingOnNewReleaseCommit, tipOfStagingBranch } ) => [
167167 `v${ version } ` ,
168168 `${ workingOnNewReleaseCommit } :refs/heads/v${ versionComponents . major } .x` ,
@@ -400,16 +400,16 @@ export default class ReleasePromotion extends Session {
400400 return workingOnNewReleaseCommit . trim ( ) ;
401401 }
402402
403- async pushToRemote ( ...refs ) {
403+ async pushToRemote ( upstream , ...refs ) {
404404 const { cli, dryRun } = this ;
405405
406406 this . defaultBranch ??= await this . getDefaultBranch ( ) ;
407407
408- let prompt = `Push release tag and commits to ${ this . upstream } ?` ;
408+ let prompt = `Push release tag and commits to ${ upstream } ?` ;
409409 if ( dryRun ) {
410410 cli . info ( dryRunMessage ) ;
411411 cli . info ( 'Run the following command to push to remote:' ) ;
412- cli . info ( `git push ${ refs . join ( ' ' ) } ` ) ;
412+ cli . info ( `git push ${ upstream } ${ refs . join ( ' ' ) } ` ) ;
413413 cli . warn ( 'Once pushed, you must not delete the local tag' ) ;
414414 prompt = 'Ready to continue?' ;
415415 }
@@ -423,7 +423,7 @@ export default class ReleasePromotion extends Session {
423423 }
424424
425425 cli . startSpinner ( 'Pushing to remote' ) ;
426- await forceRunAsync ( 'git' , [ 'push' , this . upstream , ...refs ] , { ignoreFailure : false } ) ;
426+ await forceRunAsync ( 'git' , [ 'push' , upstream , ...refs ] , { ignoreFailure : false } ) ;
427427 cli . stopSpinner ( `Pushed ${ JSON . stringify ( refs ) } to remote` ) ;
428428 cli . warn ( 'Now that it has been pushed, you must not delete the local tag' ) ;
429429 }
0 commit comments