Skip to content

Commit

Permalink
Merge pull request #157 from gsmet/previous-branch-lts
Browse files Browse the repository at this point in the history
Make sure the previous branch also has the LTS suffix in email
  • Loading branch information
gsmet authored Oct 23, 2024
2 parents 47cc54b + 0f730df commit e495c79
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/io/quarkus/bot/release/step/CreateBranch.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down
8 changes: 8 additions & 0 deletions src/main/java/io/quarkus/bot/release/util/Branches.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ public static List<String> getLtsVersionsReleasedBefore(String version) {
.toList();
}

public static String getFullBranch(String branch) {
if (isLts(branch)) {
return branch + " LTS";
}

return branch;
}

private Branches() {
}
}

0 comments on commit e495c79

Please sign in to comment.