@@ -162,7 +162,7 @@ export default class ReleasePromotion extends Session {
162
162
}
163
163
164
164
// 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 (
166
166
( { version, versionComponents, workingOnNewReleaseCommit, tipOfStagingBranch } ) => [
167
167
`v${ version } ` ,
168
168
`${ workingOnNewReleaseCommit } :refs/heads/v${ versionComponents . major } .x` ,
@@ -400,16 +400,16 @@ export default class ReleasePromotion extends Session {
400
400
return workingOnNewReleaseCommit . trim ( ) ;
401
401
}
402
402
403
- async pushToRemote ( ...refs ) {
403
+ async pushToRemote ( upstream , ...refs ) {
404
404
const { cli, dryRun } = this ;
405
405
406
406
this . defaultBranch ??= await this . getDefaultBranch ( ) ;
407
407
408
- let prompt = `Push release tag and commits to ${ this . upstream } ?` ;
408
+ let prompt = `Push release tag and commits to ${ upstream } ?` ;
409
409
if ( dryRun ) {
410
410
cli . info ( dryRunMessage ) ;
411
411
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 ( ' ' ) } ` ) ;
413
413
cli . warn ( 'Once pushed, you must not delete the local tag' ) ;
414
414
prompt = 'Ready to continue?' ;
415
415
}
@@ -423,7 +423,7 @@ export default class ReleasePromotion extends Session {
423
423
}
424
424
425
425
cli . startSpinner ( 'Pushing to remote' ) ;
426
- await forceRunAsync ( 'git' , [ 'push' , this . upstream , ...refs ] , { ignoreFailure : false } ) ;
426
+ await forceRunAsync ( 'git' , [ 'push' , upstream , ...refs ] , { ignoreFailure : false } ) ;
427
427
cli . stopSpinner ( `Pushed ${ JSON . stringify ( refs ) } to remote` ) ;
428
428
cli . warn ( 'Now that it has been pushed, you must not delete the local tag' ) ;
429
429
}
0 commit comments