Skip to content

Commit 0c72972

Browse files
committed
HHH-19078 Meaningful error during release if no issues are found
1 parent 61b4ffd commit 0c72972

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

release/release.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -481,14 +481,14 @@ class ChangeLogFile {
481481
}
482482

483483
private static getVersionId(jsonReleaseNotes, String restReleaseVersion) {
484-
def fixVersions = jsonReleaseNotes.issues.get( 0 ).fields.fixVersions
485-
486-
for ( def fixVersion : fixVersions ) {
487-
if ( fixVersion.name.equals( restReleaseVersion ) ) {
488-
return fixVersion.id
484+
for ( def issue : jsonReleaseNotes.issues ) {
485+
for ( def fixVersion : issue.fields.fixVersions ) {
486+
if ( fixVersion.name == restReleaseVersion ) {
487+
return fixVersion.id
488+
}
489489
}
490490
}
491-
throw new GradleException( "Unable to determine the version id of the current release." )
491+
throw new GradleException("No issues found for current release version (" + restReleaseVersion + "), aborting.")
492492
}
493493
}
494494

0 commit comments

Comments
 (0)