File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
lib/modules/platform/gerrit Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -152,15 +152,15 @@ export class GerritScm extends DefaultGitScm {
152152 }
153153 // If a change already exists, we push to the same target branch to
154154 // avoid creating a new change if the base branch has changed.
155- // updatePr() will take care of moving the existing change to a different base
156- // branch if needed.
157- const changeBranch = existingChange ?. branch ?? commit . baseBranch ! ;
155+ // updatePr() will later take care of moving the existing change to a
156+ // different base branch if needed.
158157 const pushResult = await git . pushCommit ( {
159158 sourceRef : commit . branchName ,
160- targetRef : `refs/for/${ changeBranch } ` ,
159+ targetRef : `refs/for/${ existingChange . branch } ` ,
161160 files : commit . files ,
162161 pushOptions,
163162 } ) ;
163+ /* v8 ignore else -- should never happen */
164164 if ( pushResult ) {
165165 return commitSha ;
166166 }
You can’t perform that action at this time.
0 commit comments