Skip to content

Commit 5b62264

Browse files
committed
HHH-19078 Meaningful error during release if no issues are found
1 parent f026405 commit 5b62264

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

release/release.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,14 @@ class ChangeLogFile {
509509
}
510510

511511
private static getVersionId(jsonReleaseNotes, String restReleaseVersion) {
512-
def fixVersions = jsonReleaseNotes.issues.get( 0 ).fields.fixVersions
513-
514-
for ( def fixVersion : fixVersions ) {
515-
if ( fixVersion.name.equals( restReleaseVersion ) ) {
516-
return fixVersion.id
512+
for ( def issue : jsonReleaseNotes.issues ) {
513+
for ( def fixVersion : issue.fields.fixVersions ) {
514+
if ( fixVersion.name == restReleaseVersion ) {
515+
return fixVersion.id
516+
}
517517
}
518518
}
519-
throw new GradleException( "Unable to determine the version id of the current release." )
519+
throw new GradleException("No issues found for current release version (" + restReleaseVersion + "), aborting.")
520520
}
521521
}
522522

0 commit comments

Comments
 (0)