in src/main/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractor.java [45:62]
public String getRevision(PatchSet.Id patchSetId) {
try {
ChangeInfo info =
gApi.changes()
.id(patchSetId.changeId().get())
.get(EnumSet.of(ListChangesOption.ALL_REVISIONS));
for (Map.Entry<String, RevisionInfo> e : info.revisions.entrySet()) {
if (e.getValue()._number == patchSetId.get()) {
return e.getKey();
}
}
return null;
} catch (RestApiException e) {
// previous is still empty to indicate that there was no previous
// accessible patch set. We treat every occurrence as added.
}
return null;
}