From 0f730df31c0fe2e72e3c635284753238ed1da556 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 16 Oct 2024 11:03:59 +0200 Subject: [PATCH] Make sure the previous branch also has the LTS suffix in email --- .../java/io/quarkus/bot/release/step/CreateBranch.java | 6 +++--- src/main/java/io/quarkus/bot/release/util/Branches.java | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/quarkus/bot/release/step/CreateBranch.java b/src/main/java/io/quarkus/bot/release/step/CreateBranch.java index aa2e365..70d65a7 100644 --- a/src/main/java/io/quarkus/bot/release/step/CreateBranch.java +++ b/src/main/java/io/quarkus/bot/release/step/CreateBranch.java @@ -275,12 +275,12 @@ private static String getBranchEmail(ReleaseInformation releaseInformation, Stri + "\n" + "- for anything required in " + releaseInformation.getFullBranch() + " (currently open pull requests included), please add the " + Labels.BACKPORT_LABEL + " label\n"; - email += "- for fixes we also want in future " + previousMinorBranch + ", please add the " + Labels.backportForVersion(previousMinorBranch) + " label\n"; + email += "- for fixes we also want in future " + Branches.getFullBranch(previousMinorBranch) + ", please add the " + Labels.backportForVersion(previousMinorBranch) + " label\n"; for (String ltsBranch : Branches.getLtsVersionsReleasedBefore(previousMinorBranch).reversed()) { // 2.13 is not an official LTS so we have to special case it - email += "- for fixes we also want in future " + ltsBranch - + (Branches.BRANCH_2_13.equals(ltsBranch) ? "" : " LTS") + ", please add the " + Labels.backportForVersion(ltsBranch) + email += "- for fixes we also want in future " + + (Branches.BRANCH_2_13.equals(ltsBranch) ? ltsBranch : Branches.getFullBranch(ltsBranch)) + ", please add the " + Labels.backportForVersion(ltsBranch) + " label\n"; } diff --git a/src/main/java/io/quarkus/bot/release/util/Branches.java b/src/main/java/io/quarkus/bot/release/util/Branches.java index 58a8edd..a8f9c2a 100644 --- a/src/main/java/io/quarkus/bot/release/util/Branches.java +++ b/src/main/java/io/quarkus/bot/release/util/Branches.java @@ -49,6 +49,14 @@ public static List getLtsVersionsReleasedBefore(String version) { .toList(); } + public static String getFullBranch(String branch) { + if (isLts(branch)) { + return branch + " LTS"; + } + + return branch; + } + private Branches() { } }