Skip to content

Commit c6e53b6

Browse files
committed
Fix gerrit scm coverage
1 parent a64c2b3 commit c6e53b6

File tree

1 file changed

+2
-1
lines changed
  • lib/modules/platform/gerrit

1 file changed

+2
-1
lines changed

lib/modules/platform/gerrit/scm.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,14 @@ export class GerritScm extends DefaultGitScm {
154154
// avoid creating a new change if the base branch has changed.
155155
// updatePr() will take care of moving the existing change to a different base
156156
// branch if needed.
157-
const changeBranch = existingChange?.branch ?? commit.baseBranch!;
157+
const changeBranch = existingChange.branch ?? commit.baseBranch!;
158158
const pushResult = await git.pushCommit({
159159
sourceRef: commit.branchName,
160160
targetRef: `refs/for/${changeBranch}`,
161161
files: commit.files,
162162
pushOptions,
163163
});
164+
/* v8 ignore else -- should never happen */
164165
if (pushResult) {
165166
return commitSha;
166167
}

0 commit comments

Comments
 (0)