Skip to content

Commit

Permalink
chore: fix gerrit eslint (#28833)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed May 4, 2024
1 parent c3b9ef8 commit ca23445
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/modules/platform/gerrit/scm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class GerritScm extends DefaultGitScm {
.findChanges(repository, searchConfig, true)
.then((res) => res.pop());
if (change) {
return change.current_revision! as LongCommitSha;
return change.current_revision as LongCommitSha;
}
return git.getBranchCommit(branchName);
}
Expand All @@ -52,7 +52,7 @@ export class GerritScm extends DefaultGitScm {
.findChanges(repository, searchConfig, true)
.then((res) => res.pop());
if (change) {
const currentGerritPatchset = change.revisions![change.current_revision!];
const currentGerritPatchset = change.revisions[change.current_revision];
return currentGerritPatchset.actions?.['rebase'].enabled === true;
}
return true;
Expand Down Expand Up @@ -85,7 +85,7 @@ export class GerritScm extends DefaultGitScm {
.findChanges(repository, searchConfig, true)
.then((res) => res.pop());
if (change) {
const currentGerritPatchset = change.revisions![change.current_revision!];
const currentGerritPatchset = change.revisions[change.current_revision];
return currentGerritPatchset.uploader.username !== username;
}
return false;
Expand Down Expand Up @@ -153,9 +153,7 @@ export class GerritScm extends DefaultGitScm {
.findChanges(repository, searchConfig, true)
.then((res) => res.pop());
if (change) {
return super.mergeToLocal(
change.revisions![change.current_revision!].ref,
);
return super.mergeToLocal(change.revisions[change.current_revision].ref);
}
return super.mergeToLocal(branchName);
}
Expand Down

0 comments on commit ca23445

Please sign in to comment.