File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ export class CreatePRContextNew {
110110 currentRemote,
111111 currentBranch
112112 } ;
113+ const startingBaseOwner = this . createParams . baseRemote ?. owner ;
114+ const startingBaseRepo = this . createParams . baseRemote ?. repositoryName ;
113115 const response : ChooseBaseRemoteAndBranchResult = await this . postMessage ( {
114116 command : 'pr.changeBaseRemoteAndBranch' ,
115117 args
@@ -120,14 +122,16 @@ export class CreatePRContextNew {
120122 baseBranch : response . baseBranch ,
121123 createError : ''
122124 } ;
123- if ( ( this . createParams . baseRemote ?. owner !== response . baseRemote . owner ) || ( this . createParams . baseRemote . repositoryName !== response . baseRemote . repositoryName ) ) {
125+ if ( ( startingBaseOwner !== response . baseRemote . owner ) || ( startingBaseRepo !== response . baseRemote . repositoryName ) ) {
124126 updateValues . defaultMergeMethod = response . defaultMergeMethod ;
125127 updateValues . allowAutoMerge = response . allowAutoMerge ;
126128 updateValues . mergeMethodsAvailability = response . mergeMethodsAvailability ;
127129 updateValues . autoMergeDefault = response . autoMergeDefault ;
128130 updateValues . baseHasMergeQueue = response . baseHasMergeQueue ;
129131 if ( ! this . createParams . allowAutoMerge && updateValues . allowAutoMerge ) {
130132 updateValues . autoMerge = this . createParams . isDraft ? false : updateValues . autoMergeDefault ;
133+ } else if ( this . createParams . allowAutoMerge && ! updateValues . allowAutoMerge ) {
134+ updateValues . autoMerge = false ;
131135 }
132136 updateValues . defaultTitle = response . defaultTitle ;
133137 if ( ( this . createParams . pendingTitle === undefined ) || ( this . createParams . pendingTitle === this . createParams . defaultTitle ) ) {
You can’t perform that action at this time.
0 commit comments