Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid considering fixVersions that are not valid releases when calculating the hgupdate-sync label #1010

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -225,7 +225,7 @@ public void onNewCommits(HostedRepository repository, Repository localRepository
}

if (requestedVersion != null) {
var fixVersion = JdkVersion.parse(requestedVersion);
var fixVersion = JdkVersion.parse(requestedVersion).orElseThrow();
var existing = Backports.findIssue(issue, fixVersion);
if (existing.isEmpty()) {
issue = jbsBackport.createBackport(issue, requestedVersion, username.orElse(null));
@@ -345,7 +345,7 @@ public void onNewOpenJDKTagCommits(HostedRepository repository, Repository local
if (requestedVersion == null) {
throw new RuntimeException("Failed to determine requested fixVersion for " + issue.id());
}
var fixVersion = JdkVersion.parse(requestedVersion);
var fixVersion = JdkVersion.parse(requestedVersion).orElseThrow();
var existing = Backports.findIssue(issue, fixVersion);
if (existing.isEmpty()) {
throw new RuntimeException("Cannot find a properly resolved issue for: " + issue.id());
@@ -90,8 +90,6 @@ void nonConforming() {
assertEquals(Optional.empty(), JdkVersion.parse("bla"));
assertEquals(Optional.empty(), JdkVersion.parse(""));
assertEquals(Optional.empty(), JdkVersion.parse("12u-cpu"));
assertEquals(Optional.empty(), JdkVersion.parse("12u-cpu"));
assertEquals(Optional.empty(), JdkVersion.parse("13u-open"));
assertEquals(Optional.empty(), JdkVersion.parse("13u-open"));
}
}