fix(timelineAPI): fix issue with semantic versioning (#5033)

This commit is contained in:
RyanHolstien 2022-05-27 19:17:57 -05:00 committed by GitHub
parent a39a8b26a2
commit 9af78cf83d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,9 +427,9 @@ public class TimelineServiceImpl implements TimelineService {
ChangeTransaction element = transactionList.get(i);
result.getChangeEvents().addAll(element.getChangeEvents());
maxSemanticChangeType =
result.getSemVerChange().compareTo(element.getSemVerChange()) >= 0 ? result.getSemVerChange()
maxSemanticChangeType.compareTo(element.getSemVerChange()) >= 0 ? maxSemanticChangeType
: element.getSemVerChange();
maxSemVer = result.getSemVer().compareTo(element.getSemVer()) >= 0 ? result.getSemVer() : element.getSemVer();
maxSemVer = maxSemVer.compareTo(element.getSemVer()) >= 0 ? maxSemVer : element.getSemVer();
}
result.setSemVerChange(maxSemanticChangeType);
result.setSemanticVersion(maxSemVer);