Skip to content

Commit

Permalink
Merge pull request #63 from gsmet/email-templates
Browse files Browse the repository at this point in the history
Use code blocks for email templates for easy copy/pasting
  • Loading branch information
gsmet authored Jan 26, 2024
2 parents 7bc3df0 + 2ca6518 commit 1c0440a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 37 deletions.
32 changes: 18 additions & 14 deletions src/main/java/io/quarkus/bot/release/step/AnnounceRelease.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,24 @@ public int run(Context context, Commands commands, GitHub quarkusBotGitHub, Rele
} else {
comment.append("Then it is time to send an email to [[email protected]](mailto:[email protected]):\n\n");
comment.append("Subject: `Quarkus " + releaseInformation.getVersion() + " released`\n\n");
comment.append("> Hi,\n"
+ "> \n"
+ "> We released Quarkus " + releaseInformation.getVersion() + ".\n"
+ "> \n"
+ "> Changelog is here:\n"
+ "> https://github.com/quarkusio/quarkus/releases/tag/" + releaseInformation.getVersion() + "\n"
+ "> \n"
+ "> Please try to upgrade your applications and report back:\n"
+ "> - if everything is going well, just post a reply to this thread\n"
+ "> - if you encounter issues, please open a GitHub issue in our tracker with a simple reproducer\n"
+ "> \n"
+ "> We will build the final core artifacts next Wednesday.\n"
+ "> \n"
+ "> Thanks!\n");
comment.append("```\n");
comment.append("Hi,\n"
+ "\n"
+ "We released Quarkus " + releaseInformation.getVersion() + ".\n"
+ "\n"
+ "Changelog is here:\n"
+ "https://github.com/quarkusio/quarkus/releases/tag/" + releaseInformation.getVersion() + "\n"
+ "\n"
+ "Please try to upgrade your applications and report back:\n"
+ "- if everything is going well, just post a reply to this thread\n"
+ "- if you encounter issues, please open a GitHub issue in our tracker with a simple reproducer\n"
+ "\n"
+ "We will build the final core artifacts next Wednesday.\n"
+ "\n"
+ "Thanks!\n\n"
+ "--\n"
+ "The Quarkus dev team");
comment.append("```\n");
}

issue.comment(comment.toString());
Expand Down
30 changes: 16 additions & 14 deletions src/main/java/io/quarkus/bot/release/step/CreateBranch.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,24 +232,26 @@ private static Optional<GHMilestone> getMilestone(GHRepository repository, Strin

private static String getBranchEmail(ReleaseInformation releaseInformation, String previousMinorBranch, String nextMinor) {
String email = "Subject: `Quarkus " + releaseInformation.getBranch() + " branched`\n\n"
+ "> Hi,\n"
+ "> \n"
+ "> We just branched " + releaseInformation.getBranch() + ". The main branch is now " + (nextMinor != null ? nextMinor : "**X.Y**") + ".\n"
+ "> \n"
+ "> Please make sure you add the appropriate backport labels from now on:\n"
+ "> \n"
+ "> - for anything required in " + releaseInformation.getBranch() + " (currently open pull requests included), please add the triage/backport? label\n"
+ "> - for fixes we also want in future " + previousMinorBranch + ", please add the triage/backport-" + previousMinorBranch + "? label\n";
+ "```\n"
+ "Hi,\n"
+ "\n"
+ "We just branched " + releaseInformation.getBranch() + ". The main branch is now " + (nextMinor != null ? nextMinor : "**X.Y**") + ".\n"
+ "\n"
+ "Please make sure you add the appropriate backport labels from now on:\n"
+ "\n"
+ "- for anything required in " + releaseInformation.getBranch() + " (currently open pull requests included), please add the triage/backport? label\n"
+ "- for fixes we also want in future " + previousMinorBranch + ", please add the triage/backport-" + previousMinorBranch + "? label\n";

for (String ltsBranch : Branches.LTS_BRANCHES) {
email += "> - for fixes we also want in future " + ltsBranch + ", please add the triage/backport-" + ltsBranch + "? label\n";
email += "- for fixes we also want in future " + ltsBranch + ", please add the triage/backport-" + ltsBranch + "? label\n";
}

email += "> \n"
+ "> Thanks!\n"
+ "> \n"
+ "> --\n"
+ "> The Quarkus dev team";
email += "\n"
+ "Thanks!\n"
+ "\n"
+ "--\n"
+ "The Quarkus dev team\n"
+ "```";

return email;
}
Expand Down
25 changes: 16 additions & 9 deletions src/main/java/io/quarkus/bot/release/step/PreparePlatform.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,22 @@ public boolean shouldPause(Context context, Commands commands, GitHub quarkusBot
if (releaseInformation.isFirstFinal()) {
comment.append("* Send an email to the Platform coordination mailing list: [[email protected]](mailto:[email protected]) :\n\n");
comment.append("Subject: `Quarkus " + releaseInformation.getVersion() + " core artifacts are available`\n\n");
comment.append("> Hi,\n"
+ "> \n"
+ "> The Quarkus " + releaseInformation.getVersion() + " core artifacts are available on Maven Central.\n"
+ "> \n"
+ "> CI is still running for the upgrade, the pull request will be merged once CI has passed.\n"
+ "> We will ping teams in the pull request if some components have issues.\n\n"
+ "> If you want to update your components, please create your pull requests and make sure they are merged before next Tuesday.\n"
+ "> \n"
+ "> Thanks.\n\n");
comment.append("```\n");
comment.append("Hi,\n"
+ "\n"
+ "The Quarkus " + releaseInformation.getVersion() + " core artifacts are available on Maven Central.\n"
+ "\n"
+ "The pull request updating the Platform to Quarkus " + releaseInformation.getVersion() + " has been merged in the main branch.\n"
+ "We pinged the team maintaining components not passing the tests in the pull request.\n"
+ "\n"
+ "If you want to update your components, please create your pull requests and make sure they are merged before next Tuesday.\n"
+ "\n"
+ "Thanks.\n"
+ "\n"
+ "--\n"
+ "The Quarkus dev team\n"
);
comment.append("```\n\n");
comment.append("* If CI failed for some Platform members, please contact them so that they are aware of the issues\n\n");
comment.append(":warning: **IMPORTANT - STOP HERE**\n");
comment.append(":warning: **IMPORTANT - Wait a week before continuing with the Platform release**\n\n");
Expand Down

0 comments on commit 1c0440a

Please sign in to comment.